Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
B
Byodv2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Byodv2
Commits
0add2b63
Commit
0add2b63
authored
Sep 13, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add bottom button
parent
0a328c71
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
189 additions
and
156 deletions
+189
-156
style.dart
lib/helper/widget/style.dart
+13
-1
new_home2.dart
lib/ui/home/new_home2.dart
+176
-155
No files found.
lib/helper/widget/style.dart
View file @
0add2b63
...
@@ -181,7 +181,7 @@ TextStyle addButtonMenu({
...
@@ -181,7 +181,7 @@ TextStyle addButtonMenu({
);
);
}
}
TextStyle
addButtonBot
o
omCart
(
{
TextStyle
addButtonBot
t
omCart
(
{
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);
...
...
lib/ui/home/new_home2.dart
View file @
0add2b63
...
@@ -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:
addButtonBot
o
omCart
(
style:
addButtonBot
t
omCart
(
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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment