const constructure

This commit is contained in:
Efril
2026-03-01 20:02:12 +07:00
parent 5058f99fe0
commit e625bd3d2a
142 changed files with 817 additions and 760 deletions
@@ -42,9 +42,9 @@ class PaymentLeftPanel extends StatelessWidget {
),
],
),
SpaceHeight(8),
Divider(color: AppColor.border),
SpaceHeight(8),
const SpaceHeight(8),
const Divider(color: AppColor.border),
const SpaceHeight(8),
Expanded(
child: state.pendingItems.isEmpty
? const Center(child: Text('Tidak ada item'))
@@ -52,7 +52,7 @@ class PaymentLeftPanel extends StatelessWidget {
shrinkWrap: true,
itemCount: state.pendingItems.length,
separatorBuilder: (_, __) =>
Divider(color: AppColor.border),
const Divider(color: AppColor.border),
itemBuilder: (context, index) {
final item = state.pendingItems[index];
return ListTile(
@@ -79,13 +79,13 @@ class PaymentLeftPanel extends StatelessWidget {
},
),
),
Divider(color: AppColor.border),
const Divider(color: AppColor.border),
_buildSummaryRow('Subtotal', state.order.subtotal),
_buildSummaryRow('Pajak', state.order.taxAmount),
_buildSummaryRow('Diskon', state.order.discountAmount),
SpaceHeight(8),
DashedDivider(color: AppColor.border),
SpaceHeight(8),
const SpaceHeight(8),
const DashedDivider(color: AppColor.border),
const SpaceHeight(8),
_buildSummaryRow(
'Total',
state.order.totalAmount,
@@ -65,7 +65,7 @@ class _PaymentRightPanelState extends State<PaymentRightPanel> {
color: AppColor.white,
borderRadius: BorderRadius.circular(12),
),
padding: EdgeInsets.all(16),
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@@ -81,19 +81,19 @@ class _PaymentRightPanelState extends State<PaymentRightPanel> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SpaceHeight(24),
const SpaceHeight(24),
Text(
'Metode Pembayaran',
style: AppStyle.md.copyWith(fontWeight: FontWeight.w600),
),
SpaceHeight(12),
const SpaceHeight(12),
BlocBuilder<
PaymentMethodLoaderBloc,
PaymentMethodLoaderState
>(
builder: (context, pmState) {
if (pmState.isFetching) {
return Center(child: LoaderWithText());
return const Center(child: LoaderWithText());
}
return pmState.failureOption.fold(
() => Wrap(
@@ -129,7 +129,7 @@ class _PaymentRightPanelState extends State<PaymentRightPanel> {
);
},
),
SpaceHeight(24),
const SpaceHeight(24),
if (widget.state.paymentMethod != null &&
widget.state.paymentMethod!.type == 'cash')
Column(
@@ -233,7 +233,7 @@ class _PaymentRightPanelState extends State<PaymentRightPanel> {
);
} else {
context.read<PaymentFormBloc>().add(
PaymentFormEvent.submitted(),
const PaymentFormEvent.submitted(),
);
}
}