Commit 21db6841 authored by Dio Maulana's avatar Dio Maulana

14/09/22 new home byod

parent 0add2b63
......@@ -247,7 +247,9 @@ double heightTombol = 0.06; // untuk dikalikan di height media query
const Color backgroundColor = Color(0xffE5E5E5);
const textColorTabel = Color(0xff333333);
const textColorBlack = Color(0xff000000);
const textColorRed = Color(0xffE73636);
const textGrey = Color(0xffE0E0E0);
const textColorModalHeaderNama = Color(0xffCCCCFF);
const gridCardBackgroundColor = Color(0xffFFFFFF);
Color buttonColor =
(!isExcelso) ? const Color(0xff003366) : const Color(0xffccb46c);
......@@ -477,6 +479,7 @@ const double refreshIconSize = 0.02;
//** max item menu */
const int maxItemMenu = 10;
const int maxItemMenuFav = 10;
//** max item menu */
//** type menu */
......
import 'package:byod/helper/widget/style.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../bloc/order_bloc.dart';
import '../../models/filter_menu.dart';
import '../../models/order_variants.dart';
import '../../models/orders.dart';
import '../helper.dart';
class NoteModalBottomSheet extends StatelessWidget {
const NoteModalBottomSheet({
Key? key,
required this.noteController,
required this.initialValue,
required this.orderVariants,
required this.menuItem,
required this.lisrOrders,
}) : super(key: key);
final TextEditingController noteController;
final int initialValue;
final List<OrderVariant> orderVariants;
final FilterMenu menuItem;
final List<Orders> lisrOrders;
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 20),
height: MediaQuery.of(context).size.height * 0.9,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
margin: const EdgeInsets.only(
top: 20,
bottom: 20,
),
child: defaultText(
context,
'catatan untuk pesanan',
style: textHeaderNote(),
),
),
const Divider(
thickness: 2,
color: Colors.white,
),
TextField(
maxLength: maxLengthTextField,
maxLines: 5,
autofocus: true,
keyboardType: TextInputType.text,
controller: noteController,
style: noteModal(),
decoration: InputDecoration(
border: InputBorder.none,
hintText: placeHolderNote,
hintStyle: const TextStyle(
color: Colors.grey,
fontFamily: 'OpenSans',
fontSize: 14,
),
),
),
const Divider(
thickness: 2,
color: Colors.white,
),
const SizedBox(
height: 20,
),
GestureDetector(
onTap: () {
context.read<OrdersBloc>().insertData([
[
menuItem.id,
menuItem.name,
initialValue,
amountParseToInt(menuItem.price),
lisrOrders,
menuItem.imageUrlMedium,
orderVariants,
amountParseToInt(menuItem.price),
noteController.text
]
], context);
Navigator.pop(context);
},
child: Align(
alignment: Alignment.centerRight,
child: Container(
height: 36,
width: 89,
decoration: BoxDecoration(
color: buttonColor,
borderRadius: BorderRadius.circular(21),
),
child: Center(
child: defaultText(
context,
"Simpan",
style: simpanButtonNote(),
),
),
),
),
)
],
),
);
}
}
import 'dart:ui';
import 'package:byod/helper/helper.dart';
import 'package:flutter/material.dart';
......@@ -205,6 +207,55 @@ TextStyle textAmountButtonBottomCart({
);
}
TextStyle textCountItem({
font = 20,
Color color = textInButton,
}) {
return TextStyle(
fontFamily: 'Robot',
fontSize: font,
fontWeight: FontWeight.w500,
color: color,
);
}
TextStyle textHeaderNote({
font = 20,
Color color = textColorBlack,
}) {
return TextStyle(
fontFamily: 'Mulish',
fontSize: font,
fontWeight: FontWeight.w700,
color: color,
);
}
TextStyle simpanButtonNote({
font = 16,
Color color = textInButton,
FontWeight fontWeight = FontWeight.w400,
}) {
return TextStyle(
fontFamily: 'OpenSans',
fontSize: font,
fontWeight: fontWeight,
color: color,
);
}
TextStyle modalNamaHeader({
font = 14,
Color color = textColorModalHeaderNama,
}) {
return TextStyle(
fontFamily: 'OpenSans',
fontSize: font,
fontWeight: FontWeight.w400,
color: color,
);
}
Text fontAwesome(BuildContext context, String unicode, double fontSize,
{Color? color, isBold = true}) {
// double widthScreens = responsiveWidthScreen(context);
......@@ -389,6 +440,15 @@ Text textAddButton(BuildContext context, String text) {
// ));
}
TextStyle noteModal() {
return const TextStyle(
fontFamily: 'OpenSans',
fontWeight: FontWeight.w400,
color: textColorBlack,
fontSize: 14,
);
}
TextStyle textStyleListHistoryOrder(context,
{font = listHistoryFontName, isBold = false}) {
return TextStyle(
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -11,6 +11,7 @@ import 'package:byod/helper/widget/style.dart';
import 'package:byod/main.dart';
import 'package:byod/models/bill.dart';
import 'package:byod/models/member_info.dart';
import 'package:byod/ui/home/new_home2.dart';
import 'package:byod/ui/payment/payment.dart';
import 'package:byod/ui/screen_responsive.dart';
import 'package:byod/ui/viewbill/shimmer_bill.dart';
......@@ -419,7 +420,7 @@ Mohon menuju kasir untuk meminta bukti pembayaran''';
context,
MaterialPageRoute(
builder: (_) =>
const Home()));
const NewHome2()));
},
child: Container(
padding: EdgeInsets.symmetric(
......@@ -753,7 +754,7 @@ Mohon menuju kasir untuk meminta bukti pembayaran''';
Navigator.push(
context,
MaterialPageRoute(
builder: (_) => const Home()));
builder: (_) => const NewHome2()));
},
child: Container(
padding: EdgeInsets.symmetric(
......@@ -1246,8 +1247,8 @@ Mohon menuju kasir untuk meminta bukti pembayaran''';
GestureDetector(
onTap: () {
if (!widget.isHistory) {
Navigator.pushReplacement(
context, MaterialPageRoute(builder: (_) => Home()));
Navigator.pushReplacement(context,
MaterialPageRoute(builder: (_) => const NewHome2()));
context.read<BranchExist>().branchExist(
branchCode, brandCode, role, cashierName, sessionId);
} else {
......
......@@ -73,6 +73,9 @@ flutter:
- asset: assets/fonts/font_awesome/fa-solid-900.ttf
weight: 600
- asset: assets/fonts/font_awesome/fa-regular-400.ttf
- family: Mulish
fonts:
- asset: assets/fonts/mulish/Mulish-Regular.ttf
# - family: NotoSans
# fonts:
# - asset: assets/fonts/noto_sans/NotoSans-Regular.ttf
......
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