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({
);
}
TextStyle
addButtonBot
o
omCart
(
{
TextStyle
addButtonBot
t
omCart
(
{
font
=
16
,
Color
color
=
textInButton
,
})
{
...
...
@@ -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
,
{
Color
?
color
,
isBold
=
true
})
{
// double widthScreens = responsiveWidthScreen(context);
...
...
lib/ui/home/new_home2.dart
View file @
0add2b63
...
...
@@ -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
(
bottom:
0
,
child:
Container
(
...
...
@@ -458,7 +473,9 @@ class _NewHome2State extends State<NewHome2> {
decoration:
BoxDecoration
(
color:
buttonColor
,
borderRadius:
const
BorderRadius
.
only
(
topRight:
Radius
.
circular
(
30
)),
topRight:
Radius
.
circular
(
30
),
topLeft:
Radius
.
circular
(
10
),
),
),
child:
Row
(
crossAxisAlignment:
...
...
@@ -469,7 +486,11 @@ class _NewHome2State extends State<NewHome2> {
margin:
EdgeInsets
.
only
(
left:
paddingLeftRight
),
child:
defaultText
(
context
,
'Rp 25,000'
),
context
,
'Rp 25,000'
,
style:
textAmountButtonBottomCart
(),
),
),
),
Container
(
...
...
@@ -492,7 +513,7 @@ class _NewHome2State extends State<NewHome2> {
defaultText
(
context
,
"Pesan"
,
style:
addButtonBot
o
omCart
(
style:
addButtonBot
t
omCart
(
color:
buttonColor
,
),
),
...
...
@@ -550,158 +571,158 @@ class _NewHome2State extends State<NewHome2> {
);
}
Container
girdFavItem
(
List
<
FilterMenu
>
favListItem
,
int
i
,
double
widthGrid
,
double
paddingLeftRigthGrid
,
BuildContext
context
,
)
{
bool
addCondition
=
true
;
return
Container
(
margin:
EdgeInsets
.
only
(
left:
(
i
==
0
)
?
0
:
8
,
// paling awal gausah dikasih margin
right:
(
i
==
favListItem
.
length
-
1
)
?
0
:
8
,
// paling akhir gausah dikasi margin
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
5
),
color:
gridCardBackgroundColor
,
),
height:
double
.
infinity
,
width:
widthGrid
,
child:
Container
(
margin:
EdgeInsets
.
only
(
top:
8
,
left:
paddingLeftRigthGrid
,
right:
paddingLeftRigthGrid
,
bottom:
16
,
),
// color: Colors.red,
child:
Column
(
children:
[
Container
(
width:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
height:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
// color: Colors.red,
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
),
child:
Image
(
fit:
BoxFit
.
fill
,
image:
NetworkImage
(
favListItem
[
i
].
imageUrlMedium
),
),
),
),
const
SizedBox
(
height:
3
,
),
Container
(
width:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
height:
28
,
// color: Colors.blue,
child:
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
end
,
children:
[
Expanded
(
child:
defaultText
(
context
,
favListItem
[
i
].
name
,
maxLines:
2
,
overFlow:
TextOverflow
.
ellipsis
,
style:
menuNameGridFav
(),
),
),
Container
(
width:
40
,
child:
defaultText
(
context
,
'Rp
${formatNumber().format(amountParseToInt(favListItem[i].price))}
'
,
maxLines:
3
,
overFlow:
TextOverflow
.
ellipsis
,
style:
menuPriceGridFav
(),
),
)
],
),
),
const
SizedBox
(
height:
16
,
),
(
addCondition
)
?
Container
(
height:
30
,
width:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
6
),
color:
buttonColor
,
),
child:
Center
(
child:
defaultText
(
context
,
'Tambah'
,
style:
addButtonGridFav
(),
),
),
)
:
Container
(
height:
30
,
width:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
child:
Row
(
children:
[
Container
(
width:
27
,
height:
24
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
6
),
color:
buttonColor
,
),
child:
const
Center
(
child:
Image
(
width:
13.33
,
height:
13.33
,
color:
textInButton
,
image:
AssetImage
(
'assets/icons/note.png'
),
),
),
),
const
SizedBox
(
width:
5
,
),
Container
(
width:
22
,
height:
22
,
child:
const
Image
(
image:
AssetImage
(
'assets/icons/minus.png'
),
),
),
Expanded
(
child:
Center
(
child:
defaultText
(
context
,
'10'
,
style:
amountGridFav
(),
),
),
),
Container
(
width:
22
,
height:
22
,
child:
const
Image
(
image:
AssetImage
(
'assets/icons/plus.png'
),
),
)
],
),
)
],
),
),
);
}
//
Container girdFavItem(
//
List<FilterMenu> favListItem,
//
int i,
//
double widthGrid,
//
double paddingLeftRigthGrid,
//
BuildContext context,
//
) {
//
bool addCondition = true;
//
return Container(
//
margin: EdgeInsets.only(
//
left: (i == 0) ? 0 : 8, // paling awal gausah dikasih margin
//
right: (i == favListItem.length - 1)
//
? 0
//
: 8, // paling akhir gausah dikasi margin
//
),
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(5),
//
color: gridCardBackgroundColor,
//
),
//
height: double.infinity,
//
width: widthGrid,
//
child: Container(
//
margin: EdgeInsets.only(
//
top: 8,
//
left: paddingLeftRigthGrid,
//
right: paddingLeftRigthGrid,
//
bottom: 16,
//
),
//
// color: Colors.red,
//
child: Column(
//
children: [
//
Container(
//
width: widthGrid - (2 * paddingLeftRigthGrid),
//
height: widthGrid - (2 * paddingLeftRigthGrid),
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(8),
//
// color: Colors.red,
//
),
//
child: ClipRRect(
//
borderRadius: BorderRadius.circular(8),
//
child: Image(
//
fit: BoxFit.fill,
//
image: NetworkImage(favListItem[i].imageUrlMedium),
//
),
//
),
//
),
//
const SizedBox(
//
height: 3,
//
),
//
Container(
//
width: widthGrid - (2 * paddingLeftRigthGrid),
//
height: 28,
//
// color: Colors.blue,
//
child: Row(
//
crossAxisAlignment: CrossAxisAlignment.end,
//
children: [
//
Expanded(
//
child: defaultText(
//
context,
//
favListItem[i].name,
//
maxLines: 2,
//
overFlow: TextOverflow.ellipsis,
//
style: menuNameGridFav(),
//
),
//
),
//
Container(
//
width: 40,
//
child: defaultText(
//
context,
//
'Rp ${formatNumber().format(amountParseToInt(favListItem[i].price))}',
//
maxLines: 3,
//
overFlow: TextOverflow.ellipsis,
//
style: menuPriceGridFav(),
//
),
//
)
//
],
//
),
//
),
//
const SizedBox(
//
height: 16,
//
),
//
(addCondition)
//
? Container(
//
height: 30,
//
width: widthGrid - (2 * paddingLeftRigthGrid),
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(6),
//
color: buttonColor,
//
),
//
child: Center(
//
child: defaultText(
//
context,
//
'Tambah',
//
style: addButtonGridFav(),
//
),
//
),
//
)
//
: Container(
//
height: 30,
//
width: widthGrid - (2 * paddingLeftRigthGrid),
//
child: Row(
//
children: [
//
Container(
//
width: 27,
//
height: 24,
//
decoration: BoxDecoration(
//
borderRadius: BorderRadius.circular(6),
//
color: buttonColor,
//
),
//
child: const Center(
//
child: Image(
//
width: 13.33,
//
height: 13.33,
//
color: textInButton,
//
image: AssetImage('assets/icons/note.png'),
//
),
//
),
//
),
//
const SizedBox(
//
width: 5,
//
),
//
Container(
//
width: 22,
//
height: 22,
//
child: const Image(
//
image: AssetImage('assets/icons/minus.png'),
//
),
//
),
//
Expanded(
//
child: Center(
//
child: defaultText(
//
context,
//
'10',
//
style: amountGridFav(),
//
),
//
),
//
),
//
Container(
//
width: 22,
//
height: 22,
//
child: const Image(
//
image: AssetImage('assets/icons/plus.png'),
//
),
//
)
//
],
//
),
//
)
//
],
//
),
//
),
//
);
//
}
Container
customAppBar
(
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