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
fabd3fc0
Commit
fabd3fc0
authored
Sep 15, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
home page fix
parent
21db6841
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
942 additions
and
662 deletions
+942
-662
config.json
assets/config.json
+1
-1
api.dart
lib/api/api.dart
+7
-0
search_menu.dart
lib/bloc/search_menu.dart
+25
-15
helper.dart
lib/helper/helper.dart
+2
-0
poni_bottom_sheet.dart
lib/helper/widget/poni_bottom_sheet.dart
+4
-7
style.dart
lib/helper/widget/style.dart
+31
-3
filter_menu.dart
lib/models/filter_menu.dart
+23
-20
bottom_sheet_menu.dart
lib/ui/home/bottom_sheet_menu.dart
+208
-121
cat_list.dart
lib/ui/home/cat_list.dart
+20
-10
fav_grid_menu.dart
lib/ui/home/fav_grid_menu.dart
+36
-7
fav_list.dart
lib/ui/home/fav_list.dart
+5
-0
menu_list_utama.dart
lib/ui/home/menu_list_utama.dart
+79
-11
new_home2.dart
lib/ui/home/new_home2.dart
+493
-467
pubspec.lock
pubspec.lock
+7
-0
pubspec.yaml
pubspec.yaml
+1
-0
No files found.
assets/config.json
View file @
fabd3fc0
{
"base_url"
:
"https://romi-dev2.ravku.com/"
,
"title"
:
"Ravintola Dev BYOD"
,
"isResponsive"
:
tru
e
,
"isResponsive"
:
fals
e
,
"debug"
:
true
}
\ No newline at end of file
lib/api/api.dart
View file @
fabd3fc0
...
...
@@ -335,6 +335,7 @@ class Api {
"sold_in_store"
:
false
,
"type"
:
typeCategory
,
"category_name"
:
dataCat
[
d
][
'name'
],
"category_id"
:
dataCat
[
d
][
'id'
],
"description"
:
''
,
"group_id"
:
''
,
"group_name"
:
''
,
...
...
@@ -391,6 +392,7 @@ class Api {
"sold_in_store"
:
false
,
"type"
:
typeGroup
,
"category_name"
:
dataCat
[
d
][
'name'
],
"category_id"
:
dataCat
[
d
][
'id'
],
"description"
:
''
,
"group_id"
:
menuList
[
i
][
'group_id'
],
"group_name"
:
menuList
[
i
][
'group_name'
],
...
...
@@ -411,6 +413,7 @@ class Api {
"sold_in_store"
:
menuList
[
i
][
'sold_in_store'
],
"type"
:
typeMenu
,
"category_name"
:
dataCat
[
d
][
'name'
],
"category_id"
:
dataCat
[
d
][
'id'
],
"description"
:
menuList
[
i
][
'description'
],
"group_name"
:
menuList
[
i
][
'group_name'
],
"group_id"
:
menuList
[
i
][
'group_id'
],
...
...
@@ -437,6 +440,7 @@ class Api {
"sold_in_store"
:
false
,
"type"
:
typeCategory
,
"category_name"
:
favGroup
[
s
][
'name'
],
"category_id"
:
favGroup
[
s
][
'id'
],
"description"
:
''
,
"group_id"
:
''
,
"group_name"
:
''
,
...
...
@@ -486,6 +490,7 @@ class Api {
"sold_in_store"
:
false
,
"type"
:
typeGroup
,
"category_name"
:
favGroup
[
s
][
'name'
],
"category_id"
:
favGroup
[
s
][
'id'
],
"description"
:
''
,
"group_id"
:
favDetail
[
i
][
'group_id'
],
"group_name"
:
favDetail
[
i
][
'group_name'
],
...
...
@@ -507,6 +512,7 @@ class Api {
"sold_in_store"
:
favDetail
[
i
][
'sold_in_store'
],
"type"
:
typeMenu
,
"category_name"
:
favGroup
[
s
][
'name'
],
"category_id"
:
favGroup
[
s
][
'id'
],
"description"
:
favDetail
[
i
][
'description'
],
"group_name"
:
favDetail
[
i
][
'group_name'
],
"group_id"
:
favDetail
[
i
][
'group_id'
],
...
...
@@ -532,6 +538,7 @@ class Api {
isSell:
false
,
type:
typeCategory
,
categoryName:
''
,
categoryId:
''
,
description:
''
,
groupId:
''
,
groupName:
''
,
...
...
lib/bloc/search_menu.dart
View file @
fabd3fc0
...
...
@@ -26,8 +26,29 @@ import 'package:byod/models/filter_menu.dart';
import
'package:flutter_bloc/flutter_bloc.dart'
;
class
SearchMenu
extends
Cubit
<
List
<
dynamic
>>
{
SearchMenu
()
:
super
([[],
'All'
,
false
]);
// return arraynya [list<Category>, SelectedCat, bool dari ini lagi search by text or not,]
SearchMenu
()
:
super
([
[
FilterMenu
(
id:
'start'
,
name:
''
,
price:
''
,
originalPrice:
''
,
imageUrlMedium:
''
,
imageUrlThumbnail:
''
,
isSell:
false
,
type:
typeMenu
,
categoryName:
''
,
categoryId:
''
,
description:
''
,
groupName:
''
,
groupId:
''
,
)
],
'All'
,
false
]);
// return arraynya [list<Category>, SelectedCat, bool dari search by text(typing) or not,]
void
searchMenu
(
List
<
FilterMenu
>
oldMenu
,
{
...
...
@@ -63,22 +84,11 @@ class SearchMenu extends Cubit<List<dynamic>> {
if
(
indexGroupId
==
-
1
&&
indexGroup
!=
-
1
)
{
searchMenu
.
add
(
oldMenu
[
indexGroup
]);
}
searchMenu
.
add
(
x
);
}
// for (var menu in x.menu) {
// if (menu.name.toLowerCase().contains(keyword.toLowerCase())) {
// // searchMenu.add(menu);
// menuSearch.add(menu);
// var x = {
// "id": cat.id,
// "name": cat.name,
// "menu": menuSearch,
// };
// searchMenu.add(Category.createCategory(x));
// }
// }
}
}
else
{
searchMenu
=
oldMenu
;
}
}
else
{
if
(
categorySelected
!=
''
)
{
...
...
lib/helper/helper.dart
View file @
fabd3fc0
...
...
@@ -249,6 +249,8 @@ const textColorTabel = Color(0xff333333);
const
textColorBlack
=
Color
(
0xff000000
);
const
textColorRed
=
Color
(
0xffE73636
);
const
textGrey
=
Color
(
0xffE0E0E0
);
const
textGreyDeskripsi
=
Color
(
0xffBDBDBD
);
const
backgroundColorBottomSheet
=
Color
(
0xffE5E5E5
);
const
textColorModalHeaderNama
=
Color
(
0xffCCCCFF
);
const
gridCardBackgroundColor
=
Color
(
0xffFFFFFF
);
Color
buttonColor
=
...
...
lib/helper/widget/poni_bottom_sheet.dart
View file @
fabd3fc0
import
'package:flutter/material.dart'
;
import
'../helper.dart'
;
class
PoniBottomSheet
extends
StatelessWidget
{
const
PoniBottomSheet
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
double
widthScreen
=
responsiveWidthScreen
(
context
);
return
Container
(
width:
widthScreen
*
0.3
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.008
,
width:
50
,
height:
3
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
roundedButton
),
color:
Colors
.
grey
),
borderRadius:
BorderRadius
.
circular
(
7
),
color:
const
Color
(
0xffD9D9D9
)
),
// child: Divider(
// color: buttonColor.withOpacity(0.6),
// thickness: MediaQuery.of(context).size.height * 0.008,
...
...
lib/helper/widget/style.dart
View file @
fabd3fc0
...
...
@@ -162,11 +162,12 @@ TextStyle deskripsiMenuStyle({
TextStyle
amountMenuStyle
(
{
font
=
16
,
Color
color
=
textColorBlack
,
FontWeight
fontWeight
=
FontWeight
.
w300
,
})
{
return
TextStyle
(
fontFamily:
(
fontFamily
==
''
)
?
null
:
fontFamily
,
fontSize:
font
,
fontWeight:
FontWeight
.
w300
,
fontWeight:
fontWeight
,
color:
color
,
);
}
...
...
@@ -212,7 +213,7 @@ TextStyle textCountItem({
Color
color
=
textInButton
,
})
{
return
TextStyle
(
fontFamily:
'Robot'
,
fontFamily:
'Robot
o
'
,
fontSize:
font
,
fontWeight:
FontWeight
.
w500
,
color:
color
,
...
...
@@ -350,6 +351,24 @@ Text textAmountMenu(BuildContext context, int amount) {
// );
}
TextStyle
textDeskripsiHeader
(
)
{
return
const
TextStyle
(
fontFamily:
'Roboto'
,
fontWeight:
FontWeight
.
w500
,
fontSize:
14
,
color:
textColorBlack
,
);
}
TextStyle
textDeskripsi
(
)
{
return
const
TextStyle
(
fontFamily:
'Roboto'
,
fontWeight:
FontWeight
.
w400
,
fontSize:
14
,
color:
textGreyDeskripsi
,
);
}
Text
textAmountCoret
(
BuildContext
context
,
int
hargaCoret
)
{
return
defaultText
(
context
,
...
...
@@ -398,7 +417,7 @@ Text textMenuNameBottomShetModalMenu(BuildContext context, String text) {
text
,
maxLines:
2
,
overFlow:
TextOverflow
.
ellipsis
,
style:
textStyleMenuList
(
context
),
style:
menuNameBottomSheet
(
),
);
// return Text(
// text,
...
...
@@ -408,6 +427,15 @@ Text textMenuNameBottomShetModalMenu(BuildContext context, String text) {
// );
}
TextStyle
menuNameBottomSheet
(
)
{
return
const
TextStyle
(
fontFamily:
'Roboto'
,
fontWeight:
FontWeight
.
w500
,
fontSize:
28
,
color:
textColorBlack
,
);
}
Text
textDescriptionBottomShetModalMenu
(
BuildContext
context
,
String
text
)
{
return
defaultText
(
context
,
...
...
lib/models/filter_menu.dart
View file @
fabd3fc0
...
...
@@ -10,6 +10,7 @@ class FilterMenu {
final
bool
isSell
;
final
int
type
;
final
String
categoryName
;
final
String
categoryId
;
final
String
description
;
final
String
groupName
;
final
String
groupId
;
...
...
@@ -28,6 +29,7 @@ class FilterMenu {
required
this
.
isSell
,
required
this
.
type
,
required
this
.
categoryName
,
required
this
.
categoryId
,
required
this
.
description
,
required
this
.
groupName
,
required
this
.
groupId
,
...
...
@@ -39,25 +41,26 @@ class FilterMenu {
factory
FilterMenu
.
createMenu
(
Map
<
String
,
dynamic
>
json
)
{
return
FilterMenu
(
id:
json
[
'id'
],
name:
json
[
'name'
],
price:
json
[
'price'
],
originalPrice:
json
[
'original_price'
],
imageUrlMedium:
json
[
'image_medium'
],
imageUrlThumbnail:
json
[
'image_thumbnail'
],
isSell:
json
[
'sold_in_store'
],
type:
json
[
'type'
],
categoryName:
json
[
'category_name'
],
description:
json
[
'description'
],
groupName:
json
[
'group_name'
],
groupId:
json
[
'group_id'
],
isFavMenu:
(
json
[
'is_fav'
]
==
null
)
?
false
:
json
[
'is_fav'
],
variantCat:
json
[
'variant_cat'
],
favGroupId:
(
json
[
'favorite_group_id'
]
==
null
)
?
''
:
json
[
'favorite_group_id'
],
favGroupName:
(
json
[
'favorite_group_name'
]
==
null
)
?
''
:
json
[
'favorite_group_name'
]);
id:
json
[
'id'
],
name:
json
[
'name'
],
price:
json
[
'price'
],
originalPrice:
json
[
'original_price'
],
imageUrlMedium:
json
[
'image_medium'
],
imageUrlThumbnail:
json
[
'image_thumbnail'
],
isSell:
json
[
'sold_in_store'
],
type:
json
[
'type'
],
categoryName:
json
[
'category_name'
],
categoryId:
json
[
'category_id'
],
description:
json
[
'description'
],
groupName:
json
[
'group_name'
],
groupId:
json
[
'group_id'
],
isFavMenu:
(
json
[
'is_fav'
]
==
null
)
?
false
:
json
[
'is_fav'
],
variantCat:
json
[
'variant_cat'
],
favGroupId:
(
json
[
'favorite_group_id'
]
==
null
)
?
''
:
json
[
'favorite_group_id'
],
favGroupName:
(
json
[
'favorite_group_name'
]
==
null
)
?
''
:
json
[
'favorite_group_name'
],
);
}
}
lib/ui/home/bottom_sheet_menu.dart
View file @
fabd3fc0
This diff is collapsed.
Click to expand it.
lib/ui/home/cat_list.dart
View file @
fabd3fc0
// ignore_for_file: must_be_immutable
import
'package:byod/bloc/menu_selected_bar.dart'
;
import
'package:byod/models/fav_group.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
...
@@ -10,9 +11,15 @@ import '../../models/category_list.dart';
class
CategoryListHome
extends
StatefulWidget
{
List
<
CategoryList
>
categoryList
;
List
<
FavoriteGroup
>
favList
;
ScrollController
scrollController
;
// ScrollController scrollControllerMenu;
CategoryListHome
({
Key
?
key
,
required
this
.
categoryList
,
required
this
.
scrollController
,
required
this
.
favList
,
// required this.scrollControllerMenu,
})
:
super
(
key:
key
);
@override
...
...
@@ -21,14 +28,7 @@ class CategoryListHome extends StatefulWidget {
class
_CategoryListHomeState
extends
State
<
CategoryListHome
>
{
int
selectedIndex
=
0
;
List
<
String
>
catMenu
=
[
'All Item'
,
'New'
,
'Discount'
,
'Food'
,
'Beverage'
,
'Additional'
];
@override
Widget
build
(
BuildContext
context
)
{
return
BlocBuilder
<
MenuSelectedBar
,
List
<
dynamic
>>(
...
...
@@ -40,15 +40,25 @@ class _CategoryListHomeState extends State<CategoryListHome> {
itemBuilder:
(
context
,
i
)
{
return
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
context
.
read
<
MenuSelectedBar
>()
.
selectedBarMenu
(
i
,
widget
.
categoryList
[
i
].
name
);
.
selectedBarMenu
(
i
,
widget
.
categoryList
[
i
].
id
);
widget
.
scrollController
.
animateTo
(
(
widget
.
favList
.
isNotEmpty
)
?
371
:
0
,
duration:
Duration
(
milliseconds:
animatedTime
),
curve:
Curves
.
fastOutSlowIn
,
);
},
child:
Container
(
color:
backgroundColor
,
margin:
EdgeInsets
.
only
(
left:
(
i
==
0
)
?
0
:
28.335
,
right:
(
i
==
catMenu
.
length
-
1
)
?
0
:
28.335
),
right:
(
i
==
widget
.
categoryList
.
length
-
1
)
?
0
:
28.335
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
...
...
lib/ui/home/fav_grid_menu.dart
View file @
fabd3fc0
...
...
@@ -60,12 +60,17 @@ class FavGridMenu extends StatelessWidget {
height:
widthGrid
-
(
2
*
paddingLeftRigthGrid
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
8
),
// color: Colors.red
,
color:
disabledColor
.
withOpacity
(
0.8
)
,
),
child:
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
showModalBottomSheet
(
backgroundColor:
backgroundColor
.
withOpacity
(
0
)
,
backgroundColor:
Colors
.
white
,
isScrollControlled:
true
,
context:
context
,
builder:
(
context
)
{
...
...
@@ -88,11 +93,15 @@ class FavGridMenu extends StatelessWidget {
},
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
8
),
child:
Image
(
fit:
BoxFit
.
fill
,
image:
NetworkImage
(
categoryFavAfterSelect
[
i
].
imageUrlMedium
),
),
child:
(
categoryFavAfterSelect
[
i
].
imageUrlMedium
!=
''
)
?
Image
(
fit:
BoxFit
.
fill
,
image:
NetworkImage
(
categoryFavAfterSelect
[
i
].
imageUrlMedium
),
)
:
const
Image
(
fit:
BoxFit
.
fill
,
image:
AssetImage
(
'assets/noimage.png'
)),
),
),
),
...
...
@@ -177,6 +186,11 @@ class FavGridMenu extends StatelessWidget {
?
GestureDetector
(
key:
const
Key
(
'AddButton'
),
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
if
(
menuFav
.
isSell
)
{
if
(
menuFav
.
variantCat
.
isNotEmpty
)
{
if
(
indexListOrderan
==
-
1
)
{
...
...
@@ -273,6 +287,11 @@ class FavGridMenu extends StatelessWidget {
children:
[
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
showModalBottomSheet
(
backgroundColor:
backgroundColor
,
isScrollControlled:
true
,
...
...
@@ -310,6 +329,11 @@ class FavGridMenu extends StatelessWidget {
),
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
if
(
initialValue
>
0
)
{
initialValue
-=
1
;
context
.
read
<
OrdersBloc
>().
insertData
([
...
...
@@ -350,6 +374,11 @@ class FavGridMenu extends StatelessWidget {
),
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
initialValue
+=
1
;
context
.
read
<
OrdersBloc
>().
insertData
([
[
...
...
lib/ui/home/fav_list.dart
View file @
fabd3fc0
...
...
@@ -30,6 +30,11 @@ class _FavoriteListState extends State<FavoriteList> {
itemBuilder:
(
context
,
i
)
{
return
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
context
.
read
<
FavSelectedBar
>()
.
selectedBarFav
(
i
,
widget
.
favoriteList
[
i
].
id
);
...
...
lib/ui/home/menu_list_utama.dart
View file @
fabd3fc0
// ignore_for_file: sized_box_for_whitespace
import
'package:byod/bloc/order_bloc.dart'
;
import
'package:byod/helper/widget/poni_bottom_sheet.dart'
;
import
'package:byod/models/orders.dart'
;
import
'package:byod/ui/home/variant_cat.dart'
;
import
'package:flutter/material.dart'
;
...
...
@@ -13,6 +14,7 @@ import '../../helper/widget/style.dart';
import
'../../models/filter_menu.dart'
;
import
'../../models/order_details.dart'
;
import
'../../models/order_variants.dart'
;
import
'bottom_sheet_menu.dart'
;
import
'bottom_sheet_variant.dart'
;
class
MenuListUtama
extends
StatelessWidget
{
...
...
@@ -20,10 +22,14 @@ class MenuListUtama extends StatelessWidget {
Key
?
key
,
required
this
.
categoryNonFav
,
required
this
.
i
,
required
this
.
widthScreen
,
required
this
.
scrollController
,
})
:
super
(
key:
key
);
final
List
<
FilterMenu
>
categoryNonFav
;
final
int
i
;
final
double
widthScreen
;
final
ScrollController
scrollController
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -107,17 +113,56 @@ class MenuListUtama extends StatelessWidget {
width:
12
,
height:
double
.
infinity
,
),
Container
(
width:
125
,
height:
125
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
)),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
14
),
child:
Image
(
image:
NetworkImage
(
categoryNonFav
[
i
].
imageUrlMedium
,
),
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
showModalBottomSheet
(
backgroundColor:
Colors
.
white
,
isScrollControlled:
true
,
context:
context
,
builder:
(
context
)
{
return
ShowMenuModal
(
imageUrl:
categoryNonFav
[
i
].
imageUrlMedium
,
namaMenu:
categoryNonFav
[
i
].
name
,
hargaMenu:
amountParseToInt
(
categoryNonFav
[
i
].
price
),
isHavevariant:
categoryNonFav
[
i
].
variantCat
.
isNotEmpty
?
true
:
false
,
description:
categoryNonFav
[
i
].
description
,
id:
categoryNonFav
[
i
].
id
,
variantCat:
categoryNonFav
[
i
].
variantCat
,
isSell:
categoryNonFav
[
i
].
isSell
,
);
},
);
},
child:
Container
(
width:
125
,
height:
125
,
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
14
),
color:
disabledColor
.
withOpacity
(
0.8
),
),
child:
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
14
),
child:
(
categoryNonFav
[
i
].
imageUrlMedium
!=
''
)
?
Image
(
fit:
BoxFit
.
fill
,
image:
NetworkImage
(
categoryNonFav
[
i
].
imageUrlMedium
,
),
)
:
const
Image
(
fit:
BoxFit
.
fill
,
image:
AssetImage
(
'assets/noimage.png'
),
),
),
),
)
...
...
@@ -181,6 +226,12 @@ class MenuListUtama extends StatelessWidget {
const
Spacer
(),
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
if
(
menuUtama
.
isSell
)
{
if
(
menuUtama
.
variantCat
.
isNotEmpty
)
{
if
(
indexListOrderan
==
-
1
)
{
...
...
@@ -282,6 +333,11 @@ class MenuListUtama extends StatelessWidget {
children:
[
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
showModalBottomSheet
(
backgroundColor:
backgroundColor
,
isScrollControlled:
true
,
...
...
@@ -330,6 +386,12 @@ class MenuListUtama extends StatelessWidget {
left:
0
,
child:
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
if
(
initialValue
>
0
)
{
initialValue
-=
1
;
context
.
read
<
OrdersBloc
>().
insertData
([
...
...
@@ -365,6 +427,12 @@ class MenuListUtama extends StatelessWidget {
right:
0
,
child:
GestureDetector
(
onTap:
()
{
FocusScopeNode
currentFocus
=
FocusScope
.
of
(
context
);
if
(!
currentFocus
.
hasPrimaryFocus
)
{
currentFocus
.
unfocus
();
}
initialValue
+=
1
;
context
.
read
<
OrdersBloc
>().
insertData
([
[
...
...
lib/ui/home/new_home2.dart
View file @
fabd3fc0
This diff is collapsed.
Click to expand it.
pubspec.lock
View file @
fabd3fc0
...
...
@@ -261,6 +261,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.3"
scrollable_positioned_list:
dependency: "direct main"
description:
name: scrollable_positioned_list
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.4"
shared_preferences:
dependency: "direct main"
description:
...
...
pubspec.yaml
View file @
fabd3fc0
...
...
@@ -34,6 +34,7 @@ dependencies:
http
:
^0.13.4
intl
:
^0.17.0
loading_animations
:
^2.2.0
scrollable_positioned_list
:
^0.3.4
shared_preferences
:
^2.0.15
shimmer
:
^2.0.0
url_launcher
:
^6.1.5
...
...
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