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

voucher payment fixed

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