Commit 603e48d1 authored by Dio Maulana's avatar Dio Maulana

voucher payment fixed

parent 75fd958c
...@@ -1068,8 +1068,8 @@ class Api { ...@@ -1068,8 +1068,8 @@ class Api {
EasyLoading.showToast( EasyLoading.showToast(
'Pembayaran berhasil, anda akan di alihkan ke halaman bill'); 'Pembayaran berhasil, anda akan di alihkan ke halaman bill');
Future.delayed(const Duration(milliseconds: 1000), () async { Future.delayed(const Duration(milliseconds: 1000), () async {
Navigator.push( Navigator.push(context,
context, MaterialPageRoute(builder: (_) => ViewBill())); MaterialPageRoute(builder: (_) => const ViewBillNew()));
}); });
return 'OK'; return 'OK';
} }
...@@ -1078,8 +1078,8 @@ class Api { ...@@ -1078,8 +1078,8 @@ class Api {
EasyLoading.showToast( EasyLoading.showToast(
'Pembayaran berhasil, anda akan dialihkan ke halaman bill'); 'Pembayaran berhasil, anda akan dialihkan ke halaman bill');
Future.delayed(const Duration(milliseconds: 1000), () async { Future.delayed(const Duration(milliseconds: 1000), () async {
Navigator.push( Navigator.push(context,
context, MaterialPageRoute(builder: (_) => ViewBill())); MaterialPageRoute(builder: (_) => const ViewBillNew()));
}); });
return 'OK'; return 'OK';
} else { } else {
......
...@@ -266,12 +266,14 @@ const Color backgroundColor = Color(0xffF4F4F4); ...@@ -266,12 +266,14 @@ const Color backgroundColor = Color(0xffF4F4F4);
const Color backgroundColorViewBill = Color(0xffE5E5E5); const Color backgroundColorViewBill = Color(0xffE5E5E5);
const Color backgroundWhite = Color(0xffFFFFFF); const Color backgroundWhite = Color(0xffFFFFFF);
const Color dividerGrey = Color(0xff898A8D); const Color dividerGrey = Color(0xff898A8D);
const Color dividerGrey2 = Color(0xffF2F2F2);
const Color greyColor = Color(0xffD9D9D9); const Color greyColor = Color(0xffD9D9D9);
const textColorTabel = Color(0xff333333); const textColorTabel = Color(0xff333333);
const textColorBlack = Color(0xff000000); const textColorBlack = Color(0xff000000);
const textColorRed = Color(0xffE73636); const textColorRed = Color(0xffE73636);
const textColorPlaceHolder = Color(0xffA89C9C); const textColorPlaceHolder = Color(0xffA89C9C);
const textGrey = Color(0xffE0E0E0); const textGrey = Color(0xffE0E0E0);
const dashGrey = Color(0xffCCCCCC);
const textGreyBill = Color(0xff828282); const textGreyBill = Color(0xff828282);
const textGreyDeskripsi = Color(0xffBDBDBD); const textGreyDeskripsi = Color(0xffBDBDBD);
const backgroundColorBottomSheet = Color(0xffE5E5E5); const backgroundColorBottomSheet = Color(0xffE5E5E5);
...@@ -289,6 +291,7 @@ const Color pendingColor = Colors.amber; ...@@ -289,6 +291,7 @@ const Color pendingColor = Colors.amber;
const Color disabledColor = Colors.grey; const Color disabledColor = Colors.grey;
// const Color selectedColor = Color.fromARGB(255, 225, 250, 5); // const Color selectedColor = Color.fromARGB(255, 225, 250, 5);
Color selectedColor = (!isExcelso) ? Colors.green : const Color(0xff047383); Color selectedColor = (!isExcelso) ? Colors.green : const Color(0xff047383);
Color selectedColorVoucher = const Color(0xff48B8C8);
Color? backGroundPayment = Colors.grey[200] ?? Colors.grey; Color? backGroundPayment = Colors.grey[200] ?? Colors.grey;
Color responsiveLeftRigth = buttonColor; Color responsiveLeftRigth = buttonColor;
......
...@@ -4,6 +4,7 @@ import 'package:byod/helper/widget/style.dart'; ...@@ -4,6 +4,7 @@ import 'package:byod/helper/widget/style.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../helper.dart'; import '../helper.dart';
import 'button_modal.dart';
Future<dynamic> buttonDialogGlobal( Future<dynamic> buttonDialogGlobal(
BuildContext context, BuildContext context,
...@@ -44,22 +45,9 @@ Future<dynamic> buttonDialogGlobal( ...@@ -44,22 +45,9 @@ Future<dynamic> buttonDialogGlobal(
onTap: () { onTap: () {
ontapOk(); ontapOk();
}, },
child: Container( child: ButtonModal(
width: double.infinity, buttonColor: okButtonColor,
height: 40, teksButton: textOnOk,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(roundedButton),
color: okButtonColor),
child: Center(
child: defaultText(
context,
textOnOk,
style: textStyleNormalFont(
context,
color: textInButton,
),
),
),
), ),
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
...@@ -67,23 +55,10 @@ Future<dynamic> buttonDialogGlobal( ...@@ -67,23 +55,10 @@ Future<dynamic> buttonDialogGlobal(
onTap: () { onTap: () {
ontapCancel(); ontapCancel();
}, },
child: Container( child: ButtonModal(
width: double.infinity, buttonColor: Colors.transparent,
height: 40, teksButton: textOnCancel,
decoration: BoxDecoration( teksButtonColor: textColorBlack,
borderRadius: BorderRadius.circular(roundedButton),
color: Colors.transparent,
),
child: Center(
child: defaultText(
context,
textOnCancel,
style: textStyleNormalFont(
context,
color: textCancelColor,
),
),
),
), ),
) )
], ],
......
import 'package:byod/helper/helper.dart';
import 'package:flutter/material.dart';
import 'style.dart';
class ButtonModal extends StatelessWidget {
const ButtonModal({
Key? key,
required this.buttonColor,
required this.teksButton,
this.teksButtonColor = textInButton,
}) : super(key: key);
final Color buttonColor;
final String teksButton;
final Color teksButtonColor;
@override
Widget build(BuildContext context) {
return Container(
width: double.infinity,
height: 43,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: buttonColor,
),
child: Center(
child: defaultText(
context,
teksButton,
style: addButton(
font: 14,
color: teksButtonColor,
),
),
),
);
}
}
// ignore_for_file: sized_box_for_whitespace // ignore_for_file: sized_box_for_whitespace
import 'package:byod/helper/widget/style.dart'; import 'package:byod/helper/widget/style.dart';
import 'package:byod/main.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../helper.dart'; import '../helper.dart';
...@@ -61,6 +62,8 @@ class PlusMinusButton extends StatelessWidget { ...@@ -61,6 +62,8 @@ class PlusMinusButton extends StatelessWidget {
child: Image( child: Image(
image: AssetImage((initialValue < 2 && isFromVariant) image: AssetImage((initialValue < 2 && isFromVariant)
? 'assets/icons/minus.png' ? 'assets/icons/minus.png'
: (isExcelso)
? 'assets/icons/minus-gold.png'
: 'assets/icons/minus-blue.png'), : 'assets/icons/minus-blue.png'),
), ),
), ),
...@@ -80,8 +83,10 @@ class PlusMinusButton extends StatelessWidget { ...@@ -80,8 +83,10 @@ class PlusMinusButton extends StatelessWidget {
child: Container( child: Container(
width: 22, width: 22,
height: 22, height: 22,
child: const Image( child: Image(
image: AssetImage('assets/icons/plus.png'), image: AssetImage((isExcelso)
? 'assets/icons/plus-gold.png'
: 'assets/icons/plus.png'),
), ),
), ),
), ),
......
...@@ -387,6 +387,19 @@ TextStyle modalNamaHeader({ ...@@ -387,6 +387,19 @@ TextStyle modalNamaHeader({
); );
} }
TextStyle modalPaymentStyle({
font = 18,
Color color = textColorBlack,
FontWeight fontWeight = FontWeight.w600,
}) {
return TextStyle(
fontFamily: (fontFamily == '') ? null : fontFamily,
fontSize: font,
fontWeight: fontWeight,
color: color,
);
}
Text fontAwesome(BuildContext context, String unicode, double fontSize, Text fontAwesome(BuildContext context, String unicode, double fontSize,
{Color? color, isBold = true}) { {Color? color, isBold = true}) {
// double widthScreens = responsiveWidthScreen(context); // double widthScreens = responsiveWidthScreen(context);
......
...@@ -1071,10 +1071,13 @@ class _NewHome2State extends State<NewHome2> { ...@@ -1071,10 +1071,13 @@ class _NewHome2State extends State<NewHome2> {
const SizedBox( const SizedBox(
width: 7, width: 7,
), ),
const Image( Image(
width: 20, width: 20,
height: 20, height: 20,
image: AssetImage('assets/icons/cart.png')) image: AssetImage((isExcelso)
? 'assets/icons/cart-gold.png'
: 'assets/icons/cart.png'),
)
], ],
), ),
), ),
......
...@@ -118,7 +118,8 @@ class ListVoucher extends StatelessWidget { ...@@ -118,7 +118,8 @@ class ListVoucher extends StatelessWidget {
fit: BoxFit.fill, fit: BoxFit.fill,
image: NetworkImage( image: NetworkImage(
voucherListData[i].titleImageUrl, voucherListData[i].titleImageUrl,
)), ),
),
), ),
// child: ClipRRect( // child: ClipRRect(
// borderRadius: BorderRadius.only( // borderRadius: BorderRadius.only(
......
This diff is collapsed.
...@@ -206,14 +206,17 @@ class _OrderViewBillNewState extends State<OrderViewBillNew> { ...@@ -206,14 +206,17 @@ class _OrderViewBillNewState extends State<OrderViewBillNew> {
], ],
), ),
), ),
Container( (!widget.isHistory && widget.tableStatus == tableStatusOpen)
? Container(
padding: EdgeInsets.only( padding: EdgeInsets.only(
left: paddingLeftRightBill, right: paddingLeftRightBill), left: paddingLeftRightBill,
right: paddingLeftRightBill),
child: const Divider( child: const Divider(
thickness: 1, thickness: 1,
color: backgroundColor, color: backgroundColor,
), ),
), )
: const SizedBox(),
(!widget.isHistory && widget.tableStatus == tableStatusOpen) (!widget.isHistory && widget.tableStatus == tableStatusOpen)
? const SizedBox( ? const SizedBox(
height: 11, height: 11,
......
This diff is collapsed.
...@@ -7,7 +7,7 @@ packages: ...@@ -7,7 +7,7 @@ packages:
name: async name: async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "2.8.2" version: "2.9.0"
bloc: bloc:
dependency: transitive dependency: transitive
description: description:
...@@ -28,7 +28,7 @@ packages: ...@@ -28,7 +28,7 @@ packages:
name: characters name: characters
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
charcode: charcode:
dependency: transitive dependency: transitive
description: description:
...@@ -42,7 +42,7 @@ packages: ...@@ -42,7 +42,7 @@ packages:
name: clock name: clock
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
collection: collection:
dependency: transitive dependency: transitive
description: description:
...@@ -64,13 +64,20 @@ packages: ...@@ -64,13 +64,20 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.17.2" version: "0.17.2"
dotted_line:
dependency: "direct main"
description:
name: dotted_line
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
fake_async: fake_async:
dependency: transitive dependency: transitive
description: description:
name: fake_async name: fake_async
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.3.0" version: "1.3.1"
ffi: ffi:
dependency: transitive dependency: transitive
description: description:
...@@ -183,21 +190,21 @@ packages: ...@@ -183,21 +190,21 @@ packages:
name: matcher name: matcher
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.12"
material_color_utilities: material_color_utilities:
dependency: transitive dependency: transitive
description: description:
name: material_color_utilities name: material_color_utilities
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.1.4" version: "0.1.5"
meta: meta:
dependency: transitive dependency: transitive
description: description:
name: meta name: meta
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.7.0" version: "1.8.0"
nested: nested:
dependency: transitive dependency: transitive
description: description:
...@@ -211,7 +218,7 @@ packages: ...@@ -211,7 +218,7 @@ packages:
name: path name: path
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.1" version: "1.8.2"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
...@@ -349,7 +356,7 @@ packages: ...@@ -349,7 +356,7 @@ packages:
name: source_span name: source_span
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.8.2" version: "1.9.0"
stack_trace: stack_trace:
dependency: transitive dependency: transitive
description: description:
...@@ -370,21 +377,21 @@ packages: ...@@ -370,21 +377,21 @@ packages:
name: string_scanner name: string_scanner
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.1.0" version: "1.1.1"
term_glyph: term_glyph:
dependency: transitive dependency: transitive
description: description:
name: term_glyph name: term_glyph
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "1.2.0" version: "1.2.1"
test_api: test_api:
dependency: transitive dependency: transitive
description: description:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.9" version: "0.4.12"
typed_data: typed_data:
dependency: transitive dependency: transitive
description: description:
......
...@@ -27,6 +27,7 @@ environment: ...@@ -27,6 +27,7 @@ environment:
# the latest version available on pub.dev. To see which dependencies have newer # the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`. # versions available, run `flutter pub outdated`.
dependencies: dependencies:
dotted_line: ^3.1.0
flutter: flutter:
sdk: flutter sdk: flutter
flutter_bloc: ^8.0.1 flutter_bloc: ^8.0.1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment