mirror of
https://github.com/Mercantec-GHC/h4-projekt-gruppe-0-sm.git
synced 2025-04-28 00:34:06 +02:00
wrap receipt page in safearea
This commit is contained in:
parent
7542fb7c44
commit
87561c624d
@ -10,43 +10,45 @@ class ReceiptView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final receiptItems = receipt.allReceiptItems();
|
final receiptItems = receipt.allReceiptItems();
|
||||||
|
|
||||||
return Column(
|
return SafeArea(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child: Column(
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
const BackButton(),
|
children: [
|
||||||
Expanded(
|
const BackButton(),
|
||||||
child: Container(
|
Expanded(
|
||||||
margin: const EdgeInsets.all(20),
|
child: Container(
|
||||||
child: Column(
|
margin: const EdgeInsets.all(20),
|
||||||
children: [
|
child: Column(
|
||||||
Text(receipt.dateFormatted()),
|
children: [
|
||||||
Expanded(
|
Text(receipt.dateFormatted()),
|
||||||
child: Column(
|
Expanded(
|
||||||
children: [
|
child: Column(
|
||||||
ListView.builder(
|
children: [
|
||||||
shrinkWrap: true,
|
ListView.builder(
|
||||||
itemBuilder: (_, idx) => ReceiptItemView(
|
shrinkWrap: true,
|
||||||
pricePerAmount: receiptItems[idx].product.price,
|
itemBuilder: (_, idx) => ReceiptItemView(
|
||||||
name: receiptItems[idx].product.name,
|
pricePerAmount: receiptItems[idx].product.price,
|
||||||
amount: receiptItems[idx].amount),
|
name: receiptItems[idx].product.name,
|
||||||
itemCount: receiptItems.length),
|
amount: receiptItems[idx].amount),
|
||||||
Row(
|
itemCount: receiptItems.length),
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
Row(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
const Text(
|
children: [
|
||||||
"Total:",
|
const Text(
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
"Total:",
|
||||||
),
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
Text("${receipt.totalPrice()} kr"),
|
),
|
||||||
],
|
Text("${receipt.totalPrice()} kr"),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
)),
|
],
|
||||||
],
|
)),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user