const constructure
This commit is contained in:
@@ -43,7 +43,7 @@ class VoidSuccessPage extends StatelessWidget {
|
||||
flex: 35,
|
||||
child: VoidSuccessLeftPanel(state: state),
|
||||
),
|
||||
SpaceWidth(16),
|
||||
const SpaceWidth(16),
|
||||
Expanded(
|
||||
flex: 65,
|
||||
child: VoidSuccessRightPanel(state: state),
|
||||
|
||||
+14
-10
@@ -22,14 +22,14 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(24),
|
||||
),
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 120,
|
||||
height: 120,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
gradient: const LinearGradient(
|
||||
colors: [AppColor.secondaryLight, AppColor.secondaryDark],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
@@ -39,14 +39,18 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
BoxShadow(
|
||||
color: AppColor.secondaryDark.withOpacity(0.2),
|
||||
blurRadius: 20,
|
||||
offset: Offset(0, 10),
|
||||
offset: const Offset(0, 10),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Icon(Icons.check_rounded, color: Colors.white, size: 60),
|
||||
child: const Icon(
|
||||
Icons.check_rounded,
|
||||
color: Colors.white,
|
||||
size: 60,
|
||||
),
|
||||
),
|
||||
|
||||
SpaceHeight(16),
|
||||
const SpaceHeight(16),
|
||||
Text(
|
||||
'Void Berhasil!',
|
||||
style: AppStyle.h1.copyWith(
|
||||
@@ -55,7 +59,7 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SpaceHeight(8),
|
||||
const SpaceHeight(8),
|
||||
Text(
|
||||
state.voidType.isAll
|
||||
? 'Seluruh pesanan telah dibatalkan dengan sukses'
|
||||
@@ -66,7 +70,7 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
SpaceHeight(16),
|
||||
const SpaceHeight(16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -75,7 +79,7 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
'Informasi Pesanan',
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
SpaceHeight(24),
|
||||
const SpaceHeight(24),
|
||||
_buildInfoRow(
|
||||
icon: Icons.receipt_long,
|
||||
label: 'Order ID',
|
||||
@@ -139,7 +143,7 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
child: AppElevatedButton.outlined(
|
||||
onPressed: () {
|
||||
context.read<VoidFormBloc>().add(
|
||||
VoidFormEvent.clearState(),
|
||||
const VoidFormEvent.clearState(),
|
||||
);
|
||||
context.router.replaceAll([const MainRoute()]);
|
||||
},
|
||||
@@ -167,7 +171,7 @@ class VoidSuccessLeftPanel extends StatelessWidget {
|
||||
);
|
||||
},
|
||||
label: 'Cetak Struk',
|
||||
icon: Icon(Icons.print_rounded, color: AppColor.white),
|
||||
icon: const Icon(Icons.print_rounded, color: AppColor.white),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
+9
-9
@@ -79,7 +79,7 @@ class VoidSuccessRightPanel extends StatelessWidget {
|
||||
),
|
||||
],
|
||||
),
|
||||
SpaceWidth(6),
|
||||
const SpaceWidth(6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
state.voidReason ?? '',
|
||||
@@ -121,13 +121,13 @@ class VoidSuccessRightPanel extends StatelessWidget {
|
||||
color: AppColor.primary.withOpacity(0.2),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.payments_rounded,
|
||||
size: 16,
|
||||
color: AppColor.primary,
|
||||
),
|
||||
),
|
||||
SpaceWidth(12),
|
||||
const SpaceWidth(12),
|
||||
Text(
|
||||
'Total Void',
|
||||
style: AppStyle.lg.copyWith(fontWeight: FontWeight.bold),
|
||||
@@ -192,7 +192,7 @@ class VoidSuccessRightPanel extends StatelessWidget {
|
||||
color: AppColor.primaryWithOpacity(0.1),
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.restaurant_rounded,
|
||||
color: AppColor.primary,
|
||||
size: 28,
|
||||
@@ -281,9 +281,9 @@ class VoidSuccessRightPanel extends StatelessWidget {
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
border: Border(bottom: BorderSide(color: AppColor.border)),
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(24)),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
@@ -298,13 +298,13 @@ class VoidSuccessRightPanel extends StatelessWidget {
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16.0),
|
||||
),
|
||||
child: Icon(
|
||||
child: const Icon(
|
||||
Icons.info_outline_rounded,
|
||||
color: AppColor.primary,
|
||||
size: 28,
|
||||
),
|
||||
),
|
||||
SpaceWidth(16),
|
||||
const SpaceWidth(16),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -313,7 +313,7 @@ class VoidSuccessRightPanel extends StatelessWidget {
|
||||
'Detail Void',
|
||||
style: AppStyle.xxl.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
SpaceHeight(4),
|
||||
const SpaceHeight(4),
|
||||
Text(
|
||||
'Ringkasan item yang divoid',
|
||||
style: AppStyle.md.copyWith(color: AppColor.textSecondary),
|
||||
|
||||
Reference in New Issue
Block a user