feat: ui confirm payment dialog
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
import 'package:enaklo_pos/core/components/custom_modal_dialog.dart';
|
||||
import 'package:enaklo_pos/core/components/spaces.dart';
|
||||
import 'package:enaklo_pos/core/constants/colors.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SaveDialog extends StatelessWidget {
|
||||
const SaveDialog({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return CustomModalDialog(
|
||||
title: 'Pilih Aksi',
|
||||
subtitle: 'Lanjutkan proses pesanan atau simpan untuk nanti.',
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 24.0),
|
||||
child: Column(
|
||||
children: [
|
||||
_item(
|
||||
icon: Icons.schedule_outlined,
|
||||
title: 'Bayar Nanti',
|
||||
subtitle: 'Simpan pesanan dan bayar nanti',
|
||||
onTap: () {},
|
||||
),
|
||||
SpaceHeight(16.0),
|
||||
_item(
|
||||
icon: Icons.shopping_cart_checkout_outlined,
|
||||
title: 'Tambahkan Pesanan',
|
||||
subtitle: 'ambah item ke daftar pesanan',
|
||||
onTap: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _item({
|
||||
required IconData icon,
|
||||
required String title,
|
||||
required String subtitle,
|
||||
required Function() onTap,
|
||||
}) {
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16.0, vertical: 12.0),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.white,
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
border: Border.all(
|
||||
color: AppColors.grey,
|
||||
width: 1.0,
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(icon, color: AppColors.primary, size: 26.0),
|
||||
SpaceWidth(12.0),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
subtitle,
|
||||
style: const TextStyle(color: Colors.grey),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user