Commit b1e9ed76 authored by Dio Maulana's avatar Dio Maulana

view bill dan feedback

parent a238dc4b
...@@ -248,6 +248,7 @@ const Color backgroundColor = Color(0xffF4F4F4); ...@@ -248,6 +248,7 @@ 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 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);
......
// ignore_for_file: must_be_immutable
import 'package:byod/helper/widget/style.dart'; import 'package:byod/helper/widget/style.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import '../../api/api.dart'; import '../../api/api.dart';
import '../../bloc/order_bloc.dart'; import '../../bloc/order_bloc.dart';
......
...@@ -33,6 +33,19 @@ TextStyle appBarNameVariant({font = 17, Color color = textColorBlack}) { ...@@ -33,6 +33,19 @@ TextStyle appBarNameVariant({font = 17, Color color = textColorBlack}) {
); );
} }
TextStyle emojiStyle({
font = 14,
Color color = textColorBlack,
FontWeight fontWeight = FontWeight.w600,
}) {
return TextStyle(
fontFamily: (fontFamily == '') ? null : fontFamily,
fontSize: font,
fontWeight: fontWeight,
color: color,
);
}
TextStyle appBarNameViewBill({font = 17, Color color = textColorBlack}) { TextStyle appBarNameViewBill({font = 17, Color color = textColorBlack}) {
return TextStyle( return TextStyle(
fontFamily: 'Mulish', fontFamily: 'Mulish',
...@@ -261,9 +274,24 @@ TextStyle addButton({ ...@@ -261,9 +274,24 @@ TextStyle addButton({
); );
} }
TextStyle rincianPembayaran( TextStyle rincianPembayaran({
{font = 12, font = 12,
Color color = textColorBlack, Color color = textColorBlack,
FontWeight fontWeight = FontWeight.w400,
FontStyle? fontStyle,
}) {
return TextStyle(
fontFamily: 'OpenSans',
fontSize: font,
fontWeight: fontWeight,
color: color,
fontStyle: fontStyle,
);
}
TextStyle buttonBottomBill(
{font = 14,
Color color = textInButton,
FontWeight fontWeight = FontWeight.w400}) { FontWeight fontWeight = FontWeight.w400}) {
return TextStyle( return TextStyle(
fontFamily: 'OpenSans', fontFamily: 'OpenSans',
...@@ -664,12 +692,27 @@ TextStyle textStyleTambahPesanan(context) { ...@@ -664,12 +692,27 @@ TextStyle textStyleTambahPesanan(context) {
); );
} }
TextStyle textStyleVersionNumber(context) { // TextStyle textStyleVersionNumber(context) {
// return TextStyle(
// fontFamily: (fontFamily == '') ? null : fontFamily,
// fontSize: MediaQuery.of(context).size.height * versionFont,
// color: Colors.black54,
// fontStyle: FontStyle.italic,
// );
// }
TextStyle textStyleVersionNumber({
font = 10,
Color color = Colors.black54,
FontWeight fontWeight = FontWeight.w400,
FontStyle? fontStyle,
}) {
return TextStyle( return TextStyle(
fontFamily: (fontFamily == '') ? null : fontFamily, fontFamily: 'OpenSans',
fontSize: MediaQuery.of(context).size.height * versionFont, fontSize: font,
color: Colors.black54, fontWeight: fontWeight,
fontStyle: FontStyle.italic, color: color,
fontStyle: fontStyle,
); );
} }
......
...@@ -14,7 +14,9 @@ class BuildVersion extends StatelessWidget { ...@@ -14,7 +14,9 @@ class BuildVersion extends StatelessWidget {
child: defaultText( child: defaultText(
context, context,
'Ravintola BYOD v$majorVersion.$minorVersion', 'Ravintola BYOD v$majorVersion.$minorVersion',
style: textStyleVersionNumber(context), style: textStyleVersionNumber(
fontStyle: FontStyle.italic,
),
), ),
); );
} }
......
...@@ -74,7 +74,7 @@ class FinishOrder extends StatelessWidget { ...@@ -74,7 +74,7 @@ class FinishOrder extends StatelessWidget {
), ),
SizedBox(height: MediaQuery.of(context).size.height * 0.015), SizedBox(height: MediaQuery.of(context).size.height * 0.015),
ElevatedButton( ElevatedButton(
style: ElevatedButton.styleFrom(primary: buttonColor), style: ElevatedButton.styleFrom(backgroundColor: buttonColor),
onPressed: () { onPressed: () {
// list[index].note = noteController.text; // list[index].note = noteController.text;
Navigator.pushAndRemoveUntil( Navigator.pushAndRemoveUntil(
......
...@@ -4,9 +4,9 @@ import 'dart:convert'; ...@@ -4,9 +4,9 @@ import 'dart:convert';
import 'package:byod/helper/helper.dart'; import 'package:byod/helper/helper.dart';
import 'package:byod/ui/screen_responsive.dart'; import 'package:byod/ui/screen_responsive.dart';
import 'package:byod/ui/viewbill/view_bill_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../helper/widget/style.dart'; import '../../helper/widget/style.dart';
import '../viewbill/view_bill.dart';
class HistoryOrder extends StatelessWidget { class HistoryOrder extends StatelessWidget {
final List<String> historyOrder; final List<String> historyOrder;
...@@ -68,8 +68,10 @@ class HistoryOrder extends StatelessWidget { ...@@ -68,8 +68,10 @@ class HistoryOrder extends StatelessWidget {
children: [ children: [
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Navigator.pushReplacement(context, Navigator.pushReplacement(
MaterialPageRoute(builder: (_) => ViewBill())); context,
MaterialPageRoute(
builder: (_) => const ViewBillNew()));
}, },
child: buttonBottom( child: buttonBottom(
context, context,
...@@ -102,16 +104,18 @@ class HistoryOrder extends StatelessWidget { ...@@ -102,16 +104,18 @@ class HistoryOrder extends StatelessWidget {
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (_) => ViewBill( builder: (_) => ViewBillNew(
isHistory: true, isHistory: true,
sessionId: jsonDecodeHistory['session'], sessionId: jsonDecodeHistory['session'],
branchCode: jsonDecodeHistory['branch_code'], branchCodeH: jsonDecodeHistory['branch_code'],
brandCode: jsonDecodeHistory['brand'], brandCodeH: jsonDecodeHistory['brand'],
token: jsonDecodeHistory['token'], token: jsonDecodeHistory['token'],
userName: jsonDecodeHistory['user_name'], userName: jsonDecodeHistory['user_name'],
))); ),
),
);
}, },
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
...@@ -222,7 +226,7 @@ class HistoryOrder extends StatelessWidget { ...@@ -222,7 +226,7 @@ class HistoryOrder extends StatelessWidget {
Navigator.pushReplacement( Navigator.pushReplacement(
context, context,
MaterialPageRoute( MaterialPageRoute(
builder: (_) => ViewBill(), builder: (_) => const ViewBillNew(),
), ),
); );
}, },
......
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../bloc/order_bloc.dart';
import '../../bloc/order_variant_temporary.dart';
import '../../helper/helper.dart';
import '../../helper/widget/style.dart';
import '../../models/filter_menu.dart';
import '../../models/order_details.dart';
import '../../models/orders.dart';
import 'bottom_sheet_variant.dart';
import 'variant_cat.dart';
class ShowMenuBottomSheet extends StatelessWidget {
const ShowMenuBottomSheet({
Key? key,
required this.menuDetail,
required this.i,
required this.widthScreen,
required this.widthImage,
}) : super(key: key);
final List<FilterMenu> menuDetail;
final int i;
final double widthScreen;
final double widthImage;
@override
Widget build(BuildContext context) {
return BlocBuilder<OrdersBloc, List<Orders>>(
builder: (context, list) {
int indexListOrderan = list
.indexWhere((listOrderan) => listOrderan.id == menuDetail[i].id);
int initialValue;
if (indexListOrderan != -1) {
initialValue = list[indexListOrderan].totalItem;
} else {
initialValue = 0;
}
return Container(
padding: const EdgeInsets.symmetric(horizontal: paddingLeftRight),
width: widthScreen,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: const EdgeInsets.only(top: 8, bottom: 32),
width: 50,
height: 3,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(7),
color: greyColor,
),
),
Align(
alignment: Alignment.centerLeft,
child: textMenuNameBottomShetModalMenu(
context, menuDetail[i].name),
),
const SizedBox(
height: 30,
),
ClipRRect(
borderRadius: BorderRadius.circular(21),
child: Image(
width: widthImage,
height: widthImage,
image: NetworkImage(
menuDetail[i].imageUrlMedium,
),
),
),
const SizedBox(
height: 20,
),
(menuDetail[i].description != '')
? Align(
alignment: Alignment.centerLeft,
child: defaultText(
context,
'Deskripsi',
style: textDeskripsiHeader(),
),
)
: const SizedBox(),
const SizedBox(
height: 12,
),
Align(
alignment: Alignment.centerLeft,
child: defaultText(
context,
menuDetail[i].description,
maxLines: 5,
overFlow: TextOverflow.ellipsis,
style: textDeskripsi(),
),
),
const SizedBox(
height: 12,
),
Container(
padding: const EdgeInsets.only(bottom: 18),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
defaultText(
context,
'Rp ${formatNumber().format(amountParseToInt(menuDetail[i].price))}',
style: amountMenuStyle(
font: 20, fontWeight: FontWeight.w500),
),
GestureDetector(
onTap: () {
if (menuDetail[i].isSell) {
if (menuDetail[i].variantCat.isNotEmpty) {
if (indexListOrderan == -1) {
Navigator.pop(context);
context
.read<OrderVariantTemporaryBloc>()
.insertDataVariant(
menuDetail[i].id,
amountParseToInt(menuDetail[i].price),
1,
[]); // check pada bloc untuk mengethui list arraynya
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => VariantCat(
namaMenu: menuDetail[i].name,
variantCategories:
menuDetail[i].variantCat,
initPrice: amountParseToInt(
menuDetail[i].price),
idItem: menuDetail[i].id,
imageUrl:
menuDetail[i].imageUrlMedium,
listCurrentOrder: list,
orderDetail: OrderDetail(
allIdVariant: '',
totalItem: 0,
totalHarga: 0,
note: '',
orderVariant: []),
)));
} else {
Navigator.pop(context);
showModalBottomSheet(
backgroundColor: Colors.white.withOpacity(0),
isScrollControlled: true,
context: context,
builder: (context) {
return CustomizeVariant(
orders: list[indexListOrderan],
variantCat: menuDetail[i].variantCat);
},
);
}
} else {
initialValue += 1;
context.read<OrdersBloc>().insertData([
[
menuDetail[i].id,
menuDetail[i].name,
initialValue,
amountParseToInt(menuDetail[i].price),
list,
menuDetail[i].imageUrlMedium,
[],
amountParseToInt(menuDetail[i].price),
(indexListOrderan != -1)
? list[indexListOrderan].note
: '',
]
], context);
Navigator.pop(context);
}
}
},
child: Container(
height: 38,
width: 119,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6),
color: buttonColor,
),
child: Center(
child: defaultText(
context,
'Tambah',
style: addButton(),
),
),
),
)
],
),
),
],
),
);
},
);
}
}
...@@ -104,8 +104,8 @@ GestureDetector noteMenu( ...@@ -104,8 +104,8 @@ GestureDetector noteMenu(
child: Align( child: Align(
alignment: Alignment.centerRight, alignment: Alignment.centerRight,
child: ElevatedButton( child: ElevatedButton(
style: style: ElevatedButton.styleFrom(
ElevatedButton.styleFrom(primary: buttonColor), backgroundColor: buttonColor),
onPressed: () async { onPressed: () async {
// list[index].note = noteController.text; // list[index].note = noteController.text;
if (callFrom == fromMenu) { if (callFrom == fromMenu) {
......
...@@ -66,29 +66,50 @@ class _CategoryListHomeState extends State<CategoryListHome> { ...@@ -66,29 +66,50 @@ class _CategoryListHomeState extends State<CategoryListHome> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
defaultText(
context,
widget.categoryList[i].name,
style: catNameStyle(),
),
AnimatedSwitcher( AnimatedSwitcher(
duration: Duration(milliseconds: animatedTime), duration: Duration(milliseconds: animatedTime),
transitionBuilder: transitionBuilder:
(Widget child, Animation<double> animation) { (Widget child, Animation<double> animation) {
return ScaleTransition(scale: animation, child: child); return ScaleTransition(scale: animation, child: child);
}, },
child: (selectedIndex == i) child: Container(
? Container( key: const Key('underline'),
key: const Key('underline'), padding: const EdgeInsets.only(bottom: 27),
margin: const EdgeInsets.only(top: 27), decoration: BoxDecoration(
width: 30, border: Border(
height: 1, bottom: BorderSide(
color: buttonColor, color: (selectedIndex == i)
) ? buttonColor
: const SizedBox( : Colors.transparent,
key: Key('underline'), width: 1,
), ),
) ),
),
child: defaultText(
context,
widget.categoryList[i].name,
style: catNameStyle(),
),
),
),
// AnimatedSwitcher(
// duration: Duration(milliseconds: animatedTime),
// transitionBuilder:
// (Widget child, Animation<double> animation) {
// return ScaleTransition(scale: animation, child: child);
// },
// child: (selectedIndex == i)
// ? Container(
// key: const Key('underline'),
// margin: const EdgeInsets.only(top: 27),
// width: 30,
// height: 1,
// color: buttonColor,
// )
// : const SizedBox(
// key: Key('underline'),
// ),
// )
], ],
), ),
), ),
......
...@@ -12,7 +12,8 @@ import '../../helper/widget/style.dart'; ...@@ -12,7 +12,8 @@ import '../../helper/widget/style.dart';
import '../../models/filter_menu.dart'; import '../../models/filter_menu.dart';
import '../../models/order_details.dart'; import '../../models/order_details.dart';
import '../../models/order_variants.dart'; import '../../models/order_variants.dart';
import 'bottom_sheet_menu.dart'; import '../screen_responsive.dart';
import 'bottom_sheet_menu_new.dart';
import 'bottom_sheet_variant.dart'; import 'bottom_sheet_variant.dart';
import 'variant_cat.dart'; import 'variant_cat.dart';
...@@ -32,6 +33,7 @@ class FavGridMenu extends StatelessWidget { ...@@ -32,6 +33,7 @@ class FavGridMenu extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double widthScreen = responsiveWidthScreen(context);
return Container( return Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: (i == 0) ? 0 : 8, // paling awal gausah dikasih margin left: (i == 0) ? 0 : 8, // paling awal gausah dikasih margin
...@@ -74,19 +76,30 @@ class FavGridMenu extends StatelessWidget { ...@@ -74,19 +76,30 @@ class FavGridMenu extends StatelessWidget {
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
builder: (context) { builder: (context) {
return ShowMenuModal( // return ShowMenuModal(
imageUrl: categoryFavAfterSelect[i].imageUrlMedium, // imageUrl: categoryFavAfterSelect[i].imageUrlMedium,
namaMenu: categoryFavAfterSelect[i].name, // namaMenu: categoryFavAfterSelect[i].name,
hargaMenu: // hargaMenu:
amountParseToInt(categoryFavAfterSelect[i].price), // amountParseToInt(categoryFavAfterSelect[i].price),
isHavevariant: // isHavevariant:
categoryFavAfterSelect[i].variantCat.isNotEmpty // categoryFavAfterSelect[i].variantCat.isNotEmpty
? true // ? true
: false, // : false,
description: categoryFavAfterSelect[i].description, // description: categoryFavAfterSelect[i].description,
id: categoryFavAfterSelect[i].id, // id: categoryFavAfterSelect[i].id,
variantCat: categoryFavAfterSelect[i].variantCat, // variantCat: categoryFavAfterSelect[i].variantCat,
isSell: categoryFavAfterSelect[i].isSell, // isSell: categoryFavAfterSelect[i].isSell,
// );
double widthImage = widthScreen - 2 * paddingLeftRight;
return ScreenResponsive(
widget: ShowMenuBottomSheet(
menuDetail: categoryFavAfterSelect,
i: i,
widthScreen: widthScreen,
widthImage: widthImage,
),
isCoreLayout: true,
widthScreen: MediaQuery.of(context).size.width,
); );
}, },
); );
......
...@@ -46,28 +46,41 @@ class _FavoriteListState extends State<FavoriteList> { ...@@ -46,28 +46,41 @@ class _FavoriteListState extends State<FavoriteList> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
defaultText( Container(
context, padding: const EdgeInsets.only(bottom: 3),
widget.favoriteList[i].name, decoration: BoxDecoration(
style: favNameStyle(), border: Border(
bottom: BorderSide(
width: 1,
color: (selectedIndex == i)
? buttonColor
: Colors.transparent,
),
),
),
child: defaultText(
context,
widget.favoriteList[i].name,
style: favNameStyle(),
),
), ),
AnimatedSwitcher( // AnimatedSwitcher(
duration: Duration(milliseconds: animatedTime), // duration: Duration(milliseconds: animatedTime),
transitionBuilder: // transitionBuilder:
(Widget child, Animation<double> animation) { // (Widget child, Animation<double> animation) {
return ScaleTransition(scale: animation, child: child); // return ScaleTransition(scale: animation, child: child);
}, // },
child: (selectedIndex == i) // child: (selectedIndex == i)
? Container( // ? Container(
key: const Key('underline'), // key: const Key('underline'),
margin: const EdgeInsets.only(top: 2), // margin: const EdgeInsets.only(top: 2),
width: 30, // width: 30,
height: 1, // height: 1,
color: buttonColor) // color: buttonColor)
: const SizedBox( // : const SizedBox(
key: Key('underline'), // key: Key('underline'),
), // ),
) // )
], ],
), ),
), ),
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import 'package:byod/bloc/order_bloc.dart'; import 'package:byod/bloc/order_bloc.dart';
import 'package:byod/models/orders.dart'; import 'package:byod/models/orders.dart';
import 'package:byod/ui/home/variant_cat.dart'; import 'package:byod/ui/home/variant_cat.dart';
import 'package:byod/ui/screen_responsive.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
...@@ -13,9 +14,8 @@ import '../../helper/widget/style.dart'; ...@@ -13,9 +14,8 @@ import '../../helper/widget/style.dart';
import '../../models/filter_menu.dart'; import '../../models/filter_menu.dart';
import '../../models/order_details.dart'; import '../../models/order_details.dart';
import '../../models/order_variants.dart'; import '../../models/order_variants.dart';
import 'bottom_sheet_menu.dart'; import 'bottom_sheet_menu_new.dart';
import 'bottom_sheet_variant.dart'; import 'bottom_sheet_variant.dart';
import 'variant_cat_new.dart';
class MenuListUtama extends StatelessWidget { class MenuListUtama extends StatelessWidget {
const MenuListUtama({ const MenuListUtama({
...@@ -115,19 +115,32 @@ class MenuListUtama extends StatelessWidget { ...@@ -115,19 +115,32 @@ class MenuListUtama extends StatelessWidget {
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
builder: (context) { builder: (context) {
return ShowMenuModal( // return ShowMenuModal(
imageUrl: categoryNonFav[i].imageUrlMedium, // imageUrl: categoryNonFav[i].imageUrlMedium,
namaMenu: categoryNonFav[i].name, // namaMenu: categoryNonFav[i].name,
hargaMenu: amountParseToInt( // hargaMenu: amountParseToInt(
categoryNonFav[i].price), // categoryNonFav[i].price),
isHavevariant: // isHavevariant:
categoryNonFav[i].variantCat.isNotEmpty // categoryNonFav[i].variantCat.isNotEmpty
? true // ? true
: false, // : false,
description: categoryNonFav[i].description, // description: categoryNonFav[i].description,
id: categoryNonFav[i].id, // id: categoryNonFav[i].id,
variantCat: categoryNonFav[i].variantCat, // variantCat: categoryNonFav[i].variantCat,
isSell: categoryNonFav[i].isSell, // isSell: categoryNonFav[i].isSell,
// );
double widthImage =
widthScreen - 2 * paddingLeftRight;
return ScreenResponsive(
widget: ShowMenuBottomSheet(
menuDetail: categoryNonFav,
i: i,
widthScreen: widthScreen,
widthImage: widthImage,
),
isCoreLayout: true,
widthScreen:
MediaQuery.of(context).size.width,
); );
}, },
); );
......
...@@ -11,7 +11,6 @@ import 'package:byod/helper/widget/style.dart'; ...@@ -11,7 +11,6 @@ import 'package:byod/helper/widget/style.dart';
import 'package:byod/models/filter_menu.dart'; import 'package:byod/models/filter_menu.dart';
import 'package:byod/models/orders.dart'; import 'package:byod/models/orders.dart';
import 'package:byod/ui/home/menu_list_utama.dart'; import 'package:byod/ui/home/menu_list_utama.dart';
import 'package:byod/ui/home/variant_cat_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
...@@ -19,19 +18,13 @@ import 'package:scrollable_positioned_list/scrollable_positioned_list.dart'; ...@@ -19,19 +18,13 @@ import 'package:scrollable_positioned_list/scrollable_positioned_list.dart';
import 'package:sliver_tools/sliver_tools.dart'; import 'package:sliver_tools/sliver_tools.dart';
import '../../bloc/filter_menu.dart'; import '../../bloc/filter_menu.dart';
import '../../bloc/order_variant_temporary.dart';
import '../../helper/widget/button_dialog.dart'; import '../../helper/widget/button_dialog.dart';
import '../../helper/widget/note_modal_bottom_sheet.dart';
import '../../main.dart'; import '../../main.dart';
import '../../models/fav_group.dart'; import '../../models/fav_group.dart';
import '../../models/order_variants.dart';
import '../checkout/checkout.dart'; import '../checkout/checkout.dart';
import '../checkout/fuction.dart'; import '../checkout/fuction.dart';
import '../screen_responsive.dart'; import '../screen_responsive.dart';
import '../viewbill/view_bill.dart';
import '../viewbill/view_bill_new.dart'; import '../viewbill/view_bill_new.dart';
import 'bottom_sheet_menu.dart';
import 'bottom_sheet_variant.dart';
import 'cat_list.dart'; import 'cat_list.dart';
import 'fav_grid_menu.dart'; import 'fav_grid_menu.dart';
import 'fav_list.dart'; import 'fav_list.dart';
...@@ -183,14 +176,14 @@ class _NewHome2State extends State<NewHome2> { ...@@ -183,14 +176,14 @@ class _NewHome2State extends State<NewHome2> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double heightTotal = MediaQuery.of(context).size.height; // double heightTotal = MediaQuery.of(context).size.height;
double appBarHeight = 40; double appBarHeight = 40;
double searchFieldHeight = 36; double searchFieldHeight = 36;
double spacerHeight = 20; double spacerHeight = 20;
double favListHeight = 35; double favListHeight = 35;
double favItemHeight = 227; double favItemHeight = 227;
double spacerAboveCat = 16; double spacerAboveCat = 16;
double categoryFont = 14; // double categoryFont = 14;
double spacerAboveCatList = 42; double spacerAboveCatList = 42;
double catListHeight = 51; double catListHeight = 51;
double spacerAboveMenuItem = 25; double spacerAboveMenuItem = 25;
......
...@@ -48,7 +48,7 @@ class _VariantCatNewState extends State<VariantCatNew> { ...@@ -48,7 +48,7 @@ class _VariantCatNewState extends State<VariantCatNew> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
FocusScopeNode currentFocus = FocusScope.of(context); FocusScopeNode currentFocus = FocusScope.of(context);
double widthScreen = responsiveWidthScreen(context); // double widthScreen = responsiveWidthScreen(context);
return SafeArea( return SafeArea(
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
......
...@@ -40,7 +40,7 @@ class _VariantNewState extends State<VariantNew> { ...@@ -40,7 +40,7 @@ class _VariantNewState extends State<VariantNew> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
double widthScreen = responsiveWidthScreen(context); double widthScreen = responsiveWidthScreen(context);
double currentScreen = MediaQuery.of(context).size.width; // double currentScreen = MediaQuery.of(context).size.width;
double maxWidthScreen = getMaxWidthScreen(context, useResponsive); double maxWidthScreen = getMaxWidthScreen(context, useResponsive);
// if (variantRadio.isNotEmpty) { // if (variantRadio.isNotEmpty) {
......
...@@ -5,9 +5,8 @@ import 'dart:convert'; ...@@ -5,9 +5,8 @@ import 'dart:convert';
import 'package:byod/bloc/filter_menu.dart'; import 'package:byod/bloc/filter_menu.dart';
import 'package:byod/bloc/member_info.dart'; import 'package:byod/bloc/member_info.dart';
import 'package:byod/helper/helper.dart'; import 'package:byod/helper/helper.dart';
import 'package:byod/ui/home/home.dart';
import 'package:byod/ui/no_route.dart'; import 'package:byod/ui/no_route.dart';
import 'package:byod/ui/viewbill/view_bill.dart'; import 'package:byod/ui/viewbill/view_bill_new.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';
...@@ -84,11 +83,12 @@ class _SplashState extends State<Splash> { ...@@ -84,11 +83,12 @@ class _SplashState extends State<Splash> {
if (widget.toBill == 'go') { if (widget.toBill == 'go') {
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
Navigator.pushReplacement( Navigator.pushReplacement(
context, MaterialPageRoute(builder: (_) => ViewBill())); context, MaterialPageRoute(builder: (_) => const ViewBillNew()));
} else { } else {
// ignore: use_build_context_synchronously // ignore: use_build_context_synchronously
// Navigator.pushReplacement( // Navigator.pushReplacement(
// context, MaterialPageRoute(builder: (_) => const Home())); // context, MaterialPageRoute(builder: (_) => const Home()));
// ignore: use_build_context_synchronously
Navigator.pushReplacement( Navigator.pushReplacement(
context, MaterialPageRoute(builder: (_) => const NewHome2())); context, MaterialPageRoute(builder: (_) => const NewHome2()));
} }
......
...@@ -61,7 +61,7 @@ class CustomAppBar extends StatelessWidget { ...@@ -61,7 +61,7 @@ class CustomAppBar extends StatelessWidget {
Center( Center(
child: defaultText( child: defaultText(
context, context,
'Check-Out', (!isHistory) ? 'Check-Out' : 'Riwayat Pesanan',
maxLines: 1, maxLines: 1,
overFlow: TextOverflow.ellipsis, overFlow: TextOverflow.ellipsis,
style: appBarNameViewBill(), style: appBarNameViewBill(),
......
...@@ -8,9 +8,13 @@ class ListOrder extends StatelessWidget { ...@@ -8,9 +8,13 @@ class ListOrder extends StatelessWidget {
const ListOrder({ const ListOrder({
Key? key, Key? key,
required this.billDetail, required this.billDetail,
required this.isHistory,
required this.tableStatus,
}) : super(key: key); }) : super(key: key);
final List<BillDetail> billDetail; final List<BillDetail> billDetail;
final bool isHistory;
final int tableStatus;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -23,6 +27,8 @@ class ListOrder extends StatelessWidget { ...@@ -23,6 +27,8 @@ class ListOrder extends StatelessWidget {
return OrderViewBillNew( return OrderViewBillNew(
billDetail: billDetail[i], billDetail: billDetail[i],
lastItem: (i + 1 == itemCounts) ? true : false, lastItem: (i + 1 == itemCounts) ? true : false,
isHistory: isHistory,
tableStatus: tableStatus,
); );
}, },
); );
......
This diff is collapsed.
This diff is collapsed.
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