Commit 0add2b63 authored by Dio Maulana's avatar Dio Maulana

add bottom button

parent 0a328c71
...@@ -181,7 +181,7 @@ TextStyle addButtonMenu({ ...@@ -181,7 +181,7 @@ TextStyle addButtonMenu({
); );
} }
TextStyle addButtonBotoomCart({ TextStyle addButtonBottomCart({
font = 16, font = 16,
Color color = textInButton, Color color = textInButton,
}) { }) {
...@@ -193,6 +193,18 @@ TextStyle addButtonBotoomCart({ ...@@ -193,6 +193,18 @@ TextStyle addButtonBotoomCart({
); );
} }
TextStyle textAmountButtonBottomCart({
font = 16,
Color color = textInButton,
}) {
return TextStyle(
fontFamily: (fontFamily == '') ? null : fontFamily,
fontSize: font,
fontWeight: FontWeight.w300,
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);
......
...@@ -450,6 +450,21 @@ class _NewHome2State extends State<NewHome2> { ...@@ -450,6 +450,21 @@ class _NewHome2State extends State<NewHome2> {
], ],
), ),
), ),
Positioned(
bottom: 40,
left: 0,
child: Container(
height: 43,
width: MediaQuery.of(context).size.width -
147,
decoration: BoxDecoration(
color: buttonColor,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(30),
),
),
),
),
Positioned( Positioned(
bottom: 0, bottom: 0,
child: Container( child: Container(
...@@ -458,7 +473,9 @@ class _NewHome2State extends State<NewHome2> { ...@@ -458,7 +473,9 @@ class _NewHome2State extends State<NewHome2> {
decoration: BoxDecoration( decoration: BoxDecoration(
color: buttonColor, color: buttonColor,
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
topRight: Radius.circular(30)), topRight: Radius.circular(30),
topLeft: Radius.circular(10),
),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
...@@ -469,7 +486,11 @@ class _NewHome2State extends State<NewHome2> { ...@@ -469,7 +486,11 @@ class _NewHome2State extends State<NewHome2> {
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: paddingLeftRight), left: paddingLeftRight),
child: defaultText( child: defaultText(
context, 'Rp 25,000'), context,
'Rp 25,000',
style:
textAmountButtonBottomCart(),
),
), ),
), ),
Container( Container(
...@@ -492,7 +513,7 @@ class _NewHome2State extends State<NewHome2> { ...@@ -492,7 +513,7 @@ class _NewHome2State extends State<NewHome2> {
defaultText( defaultText(
context, context,
"Pesan", "Pesan",
style: addButtonBotoomCart( style: addButtonBottomCart(
color: buttonColor, color: buttonColor,
), ),
), ),
...@@ -550,158 +571,158 @@ class _NewHome2State extends State<NewHome2> { ...@@ -550,158 +571,158 @@ class _NewHome2State extends State<NewHome2> {
); );
} }
Container girdFavItem( // Container girdFavItem(
List<FilterMenu> favListItem, // List<FilterMenu> favListItem,
int i, // int i,
double widthGrid, // double widthGrid,
double paddingLeftRigthGrid, // double paddingLeftRigthGrid,
BuildContext context, // BuildContext context,
) { // ) {
bool addCondition = true; // bool addCondition = true;
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
right: (i == favListItem.length - 1) // right: (i == favListItem.length - 1)
? 0 // ? 0
: 8, // paling akhir gausah dikasi margin // : 8, // paling akhir gausah dikasi margin
), // ),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5), // borderRadius: BorderRadius.circular(5),
color: gridCardBackgroundColor, // color: gridCardBackgroundColor,
), // ),
height: double.infinity, // height: double.infinity,
width: widthGrid, // width: widthGrid,
child: Container( // child: Container(
margin: EdgeInsets.only( // margin: EdgeInsets.only(
top: 8, // top: 8,
left: paddingLeftRigthGrid, // left: paddingLeftRigthGrid,
right: paddingLeftRigthGrid, // right: paddingLeftRigthGrid,
bottom: 16, // bottom: 16,
), // ),
// color: Colors.red, // // color: Colors.red,
child: Column( // child: Column(
children: [ // children: [
Container( // Container(
width: widthGrid - (2 * paddingLeftRigthGrid), // width: widthGrid - (2 * paddingLeftRigthGrid),
height: widthGrid - (2 * paddingLeftRigthGrid), // height: widthGrid - (2 * paddingLeftRigthGrid),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8), // borderRadius: BorderRadius.circular(8),
// color: Colors.red, // // color: Colors.red,
), // ),
child: ClipRRect( // child: ClipRRect(
borderRadius: BorderRadius.circular(8), // borderRadius: BorderRadius.circular(8),
child: Image( // child: Image(
fit: BoxFit.fill, // fit: BoxFit.fill,
image: NetworkImage(favListItem[i].imageUrlMedium), // image: NetworkImage(favListItem[i].imageUrlMedium),
), // ),
), // ),
), // ),
const SizedBox( // const SizedBox(
height: 3, // height: 3,
), // ),
Container( // Container(
width: widthGrid - (2 * paddingLeftRigthGrid), // width: widthGrid - (2 * paddingLeftRigthGrid),
height: 28, // height: 28,
// color: Colors.blue, // // color: Colors.blue,
child: Row( // child: Row(
crossAxisAlignment: CrossAxisAlignment.end, // crossAxisAlignment: CrossAxisAlignment.end,
children: [ // children: [
Expanded( // Expanded(
child: defaultText( // child: defaultText(
context, // context,
favListItem[i].name, // favListItem[i].name,
maxLines: 2, // maxLines: 2,
overFlow: TextOverflow.ellipsis, // overFlow: TextOverflow.ellipsis,
style: menuNameGridFav(), // style: menuNameGridFav(),
), // ),
), // ),
Container( // Container(
width: 40, // width: 40,
child: defaultText( // child: defaultText(
context, // context,
'Rp ${formatNumber().format(amountParseToInt(favListItem[i].price))}', // 'Rp ${formatNumber().format(amountParseToInt(favListItem[i].price))}',
maxLines: 3, // maxLines: 3,
overFlow: TextOverflow.ellipsis, // overFlow: TextOverflow.ellipsis,
style: menuPriceGridFav(), // style: menuPriceGridFav(),
), // ),
) // )
], // ],
), // ),
), // ),
const SizedBox( // const SizedBox(
height: 16, // height: 16,
), // ),
(addCondition) // (addCondition)
? Container( // ? Container(
height: 30, // height: 30,
width: widthGrid - (2 * paddingLeftRigthGrid), // width: widthGrid - (2 * paddingLeftRigthGrid),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), // borderRadius: BorderRadius.circular(6),
color: buttonColor, // color: buttonColor,
), // ),
child: Center( // child: Center(
child: defaultText( // child: defaultText(
context, // context,
'Tambah', // 'Tambah',
style: addButtonGridFav(), // style: addButtonGridFav(),
), // ),
), // ),
) // )
: Container( // : Container(
height: 30, // height: 30,
width: widthGrid - (2 * paddingLeftRigthGrid), // width: widthGrid - (2 * paddingLeftRigthGrid),
child: Row( // child: Row(
children: [ // children: [
Container( // Container(
width: 27, // width: 27,
height: 24, // height: 24,
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6), // borderRadius: BorderRadius.circular(6),
color: buttonColor, // color: buttonColor,
), // ),
child: const Center( // child: const Center(
child: Image( // child: Image(
width: 13.33, // width: 13.33,
height: 13.33, // height: 13.33,
color: textInButton, // color: textInButton,
image: AssetImage('assets/icons/note.png'), // image: AssetImage('assets/icons/note.png'),
), // ),
), // ),
), // ),
const SizedBox( // const SizedBox(
width: 5, // width: 5,
), // ),
Container( // Container(
width: 22, // width: 22,
height: 22, // height: 22,
child: const Image( // child: const Image(
image: AssetImage('assets/icons/minus.png'), // image: AssetImage('assets/icons/minus.png'),
), // ),
), // ),
Expanded( // Expanded(
child: Center( // child: Center(
child: defaultText( // child: defaultText(
context, // context,
'10', // '10',
style: amountGridFav(), // style: amountGridFav(),
), // ),
), // ),
), // ),
Container( // Container(
width: 22, // width: 22,
height: 22, // height: 22,
child: const Image( // child: const Image(
image: AssetImage('assets/icons/plus.png'), // image: AssetImage('assets/icons/plus.png'),
), // ),
) // )
], // ],
), // ),
) // )
], // ],
), // ),
), // ),
); // );
} // }
Container customAppBar( Container customAppBar(
BuildContext context, double paddingLeftRight, double appBarHeight) { BuildContext context, double paddingLeftRight, double appBarHeight) {
......
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