feat: order response model
This commit is contained in:
@@ -587,114 +587,112 @@ class _SplitBillPageState extends State<SplitBillPage> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColorSplitBill.cardBackground,
|
||||
border: Border.all(color: AppColorSplitBill.border),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Split Bill',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColorSplitBill.primary,
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColorSplitBill.cardBackground,
|
||||
border: Border.all(color: AppColorSplitBill.border),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Split Bill',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppColorSplitBill.primary,
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'Jumlah yang akan dibayar:',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColorSplitBill.textSecondary,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Text(
|
||||
'Jumlah yang akan dibayar:',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColorSplitBill.textSecondary,
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: AppColorSplitBill.border),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: AppColorSplitBill.border),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: TextField(
|
||||
controller: amountController,
|
||||
keyboardType: TextInputType.number,
|
||||
style: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.textPrimary,
|
||||
),
|
||||
child: TextField(
|
||||
controller: amountController,
|
||||
keyboardType: TextInputType.number,
|
||||
style: TextStyle(
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
splitAmount = int.tryParse(value) ?? 0;
|
||||
});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: '0',
|
||||
prefixText: 'Rp ',
|
||||
prefixStyle: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.textPrimary,
|
||||
),
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
splitAmount = int.tryParse(value) ?? 0;
|
||||
});
|
||||
},
|
||||
decoration: InputDecoration(
|
||||
hintText: '0',
|
||||
prefixText: 'Rp ',
|
||||
prefixStyle: TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.textPrimary,
|
||||
),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.all(16),
|
||||
),
|
||||
border: InputBorder.none,
|
||||
contentPadding: EdgeInsets.all(16),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Total yang dibayar:',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.textPrimary,
|
||||
),
|
||||
),
|
||||
SizedBox(height: 16),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Total yang dibayar:',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.textPrimary,
|
||||
),
|
||||
Text(
|
||||
'Rp ${_formatCurrency(splitAmount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.primary,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Rp ${_formatCurrency(splitAmount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColorSplitBill.primary,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Sisa bill:',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColorSplitBill.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'Sisa bill:',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColorSplitBill.textSecondary,
|
||||
),
|
||||
Text(
|
||||
'Rp ${_formatCurrency((widget.order.totalAmount ?? 0) - splitAmount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColorSplitBill.textSecondary,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'Rp ${_formatCurrency((widget.order.totalAmount ?? 0) - splitAmount)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppColorSplitBill.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user