const constructure
This commit is contained in:
@@ -86,7 +86,7 @@ class OrderInformation extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
(order?.status ?? "").toUpperCase(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -102,7 +102,7 @@ class OrderInformation extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
(order?.status ?? "").toUpperCase(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -118,7 +118,7 @@ class OrderInformation extends StatelessWidget {
|
||||
),
|
||||
child: Text(
|
||||
(order?.status ?? "").toUpperCase(),
|
||||
style: TextStyle(
|
||||
style: const TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
||||
@@ -59,7 +59,7 @@ class _OrderLeftPanelState extends State<OrderLeftPanel> {
|
||||
child: widget.state.failureOption.fold(
|
||||
() {
|
||||
if (widget.state.isFetching) {
|
||||
return Center(child: LoaderWithText());
|
||||
return const Center(child: LoaderWithText());
|
||||
}
|
||||
|
||||
if (widget.state.orders.isEmpty) {
|
||||
|
||||
@@ -87,7 +87,7 @@ class OrderList extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
const Icon(
|
||||
Icons.shopping_cart_outlined,
|
||||
size: 16,
|
||||
color: AppColor.primary,
|
||||
@@ -248,7 +248,7 @@ class OrderList extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
if (order?.splitType == 'ITEM' && order?.status == 'pending') ...[
|
||||
SpaceHeight(6),
|
||||
const SpaceHeight(6),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Container(
|
||||
|
||||
@@ -55,7 +55,7 @@ class OrderListPayment extends StatelessWidget {
|
||||
),
|
||||
Text(
|
||||
(order?.totalPaid ?? 0).currencyFormatRpV2,
|
||||
style: TextStyle(fontWeight: FontWeight.w500),
|
||||
style: const TextStyle(fontWeight: FontWeight.w500),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -53,8 +53,8 @@ class OrderRightPanel extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(color: AppColor.white),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: const BoxDecoration(color: AppColor.white),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
@@ -71,9 +71,9 @@ class OrderRightPanel extends StatelessWidget {
|
||||
}
|
||||
},
|
||||
label: 'Print Bill',
|
||||
icon: Icon(Icons.print),
|
||||
icon: const Icon(Icons.print),
|
||||
),
|
||||
SpaceWidth(8),
|
||||
const SpaceWidth(8),
|
||||
if (state.selectedOrder?.status == 'completed')
|
||||
if (state.selectedOrder?.isRefund == false)
|
||||
AppElevatedButton.outlined(
|
||||
@@ -83,7 +83,7 @@ class OrderRightPanel extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
label: 'Refund',
|
||||
icon: Icon(Icons.autorenew),
|
||||
icon: const Icon(Icons.autorenew),
|
||||
),
|
||||
if (state.selectedOrder?.status == 'pending') ...[
|
||||
AppElevatedButton.outlined(
|
||||
@@ -91,9 +91,9 @@ class OrderRightPanel extends StatelessWidget {
|
||||
VoidRoute(order: state.selectedOrder!),
|
||||
),
|
||||
label: 'Void',
|
||||
icon: Icon(Icons.undo),
|
||||
icon: const Icon(Icons.undo),
|
||||
),
|
||||
SpaceWidth(8),
|
||||
const SpaceWidth(8),
|
||||
AppElevatedButton.outlined(
|
||||
onPressed: () {
|
||||
context.router.push(
|
||||
@@ -101,10 +101,10 @@ class OrderRightPanel extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
label: 'Split Bill',
|
||||
icon: Icon(Icons.calculate_outlined),
|
||||
icon: const Icon(Icons.calculate_outlined),
|
||||
),
|
||||
|
||||
SpaceWidth(8),
|
||||
const SpaceWidth(8),
|
||||
if (state.selectedOrder?.paymentStatus != 'partial')
|
||||
AppElevatedButton.filled(
|
||||
width: 120,
|
||||
@@ -114,7 +114,7 @@ class OrderRightPanel extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
label: 'Bayar',
|
||||
icon: Icon(Icons.payment, color: Colors.white),
|
||||
icon: const Icon(Icons.payment, color: Colors.white),
|
||||
),
|
||||
],
|
||||
],
|
||||
|
||||
@@ -30,7 +30,7 @@ class OrderTitle extends StatelessWidget {
|
||||
title: title,
|
||||
bottom: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: AppColor.white,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: AppColor.border, width: 1.0),
|
||||
@@ -53,7 +53,7 @@ class OrderTitle extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
SpaceHeight(16),
|
||||
const SpaceHeight(16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -63,7 +63,7 @@ class OrderTitle extends StatelessWidget {
|
||||
showLabel: false,
|
||||
),
|
||||
),
|
||||
SpaceWidth(12),
|
||||
const SpaceWidth(12),
|
||||
GestureDetector(
|
||||
onTap: () => DateRangePickerModal.show(
|
||||
context: context,
|
||||
@@ -78,7 +78,7 @@ class OrderTitle extends StatelessWidget {
|
||||
color: AppColor.primary,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.filter_list_outlined,
|
||||
color: AppColor.white,
|
||||
size: 24,
|
||||
|
||||
Reference in New Issue
Block a user