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
769f53cd
Commit
769f53cd
authored
Oct 02, 2022
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new shimmer
parent
0eabef7a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
173 additions
and
8 deletions
+173
-8
new_home2.dart
lib/ui/home/new_home2.dart
+8
-4
shimmer_menu_new.dart
lib/ui/home/shimmer_menu_new.dart
+163
-0
splash.dart
lib/ui/splash.dart
+2
-4
No files found.
lib/ui/home/new_home2.dart
View file @
769f53cd
...
@@ -30,6 +30,7 @@ import 'fav_grid_menu.dart';
...
@@ -30,6 +30,7 @@ import 'fav_grid_menu.dart';
import
'fav_list.dart'
;
import
'fav_list.dart'
;
import
'package:byod/models/category_list.dart'
;
import
'package:byod/models/category_list.dart'
;
import
'shimmer_menu.dart'
;
import
'shimmer_menu.dart'
;
import
'shimmer_menu_new.dart'
;
class
NewHome2
extends
StatefulWidget
{
class
NewHome2
extends
StatefulWidget
{
const
NewHome2
({
Key
?
key
})
:
super
(
key:
key
);
const
NewHome2
({
Key
?
key
})
:
super
(
key:
key
);
...
@@ -313,6 +314,12 @@ class _NewHome2State extends State<NewHome2> {
...
@@ -313,6 +314,12 @@ class _NewHome2State extends State<NewHome2> {
.
selectedBarMenu
(
0
,
categoryList
[
0
].
id
);
.
selectedBarMenu
(
0
,
categoryList
[
0
].
id
);
}
}
}
}
}
else
{
return
ScreenResponsive
(
widget:
const
ShimmerMenuNew
(),
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
isCoreLayout:
true
,
);
}
}
return
BlocBuilder
<
FavSelectedBar
,
return
BlocBuilder
<
FavSelectedBar
,
...
@@ -544,10 +551,7 @@ class _NewHome2State extends State<NewHome2> {
...
@@ -544,10 +551,7 @@ class _NewHome2State extends State<NewHome2> {
"Something Went Wrong With Our Server"
)
"Something Went Wrong With Our Server"
)
:
(
restoran
==
responseApiWaiting
)
:
(
restoran
==
responseApiWaiting
)
?
ScreenResponsive
(
?
ScreenResponsive
(
widget:
ShimmerMenu
(
widget:
const
ShimmerMenuNew
(),
widthScreen:
widthScreen
,
maxWidthScreen:
maxWidthScreen
,
context:
context
),
widthScreen:
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
MediaQuery
.
of
(
context
).
size
.
width
,
isCoreLayout:
true
,
isCoreLayout:
true
,
...
...
lib/ui/home/shimmer_menu_new.dart
0 → 100644
View file @
769f53cd
// ignore_for_file: sized_box_for_whitespace
import
'package:flutter/material.dart'
;
import
'package:shimmer/shimmer.dart'
;
import
'../../helper/helper.dart'
;
class
ShimmerMenuNew
extends
StatelessWidget
{
const
ShimmerMenuNew
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
return
const
CoreShimmer
();
}
}
class
CoreShimmer
extends
StatelessWidget
{
const
CoreShimmer
({
super
.
key
});
@override
Widget
build
(
BuildContext
context
)
{
double
widthScreen
=
responsiveWidthScreen
(
context
);
return
Shimmer
.
fromColors
(
baseColor:
baseColorShimmer
,
highlightColor:
highlightColorShimmer
,
child:
Container
(
width:
widthScreen
,
height:
MediaQuery
.
of
(
context
).
size
.
height
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Center
(
child:
Container
(
margin:
const
EdgeInsets
.
only
(
top:
16
,
left:
paddingLeftRight
,
right:
paddingLeftRight
),
width:
209
,
height:
80
,
color:
Colors
.
black
,
),
),
Container
(
margin:
const
EdgeInsets
.
only
(
top:
22
,
left:
20
,
right:
20
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Container
(
width:
66
,
height:
20
,
color:
Colors
.
black
,
),
Container
(
width:
66
,
height:
20
,
color:
Colors
.
black
,
),
],
),
),
listNamaCategory
(
widthScreen
),
Container
(
margin:
const
EdgeInsets
.
only
(
top:
8
,
left:
20
,
right:
20
),
height:
227
,
width:
widthScreen
,
child:
ListView
.
builder
(
scrollDirection:
Axis
.
horizontal
,
itemCount:
5
,
itemBuilder:
(
context
,
i
)
{
return
Container
(
margin:
const
EdgeInsets
.
only
(
right:
16
),
height:
227
,
width:
136
,
color:
Colors
.
black
,
);
}),
),
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10
,
left:
20
,
right:
20
),
height:
20
,
width:
58
,
color:
Colors
.
black
,
),
listNamaCategory
(
widthScreen
),
Expanded
(
child:
ListView
.
builder
(
itemCount:
5
,
itemBuilder:
(
context
,
i
)
{
return
Container
(
margin:
const
EdgeInsets
.
only
(
top:
20
,
left:
20
,
right:
20
),
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Container
(
height:
125
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Container
(
width:
152
,
height:
14
,
color:
Colors
.
black
,
),
Container
(
width:
80
,
height:
14
,
color:
Colors
.
black
,
),
],
),
),
Container
(
width:
125
,
height:
125
,
color:
Colors
.
black
,
)
],
),
);
},
),
)
],
),
// child: Expanded(
// child: Container(
// padding: const EdgeInsets.only(
// top: 16,
// ),
// child: Row(
// children: [
// const Spacer(),
// Container(
// width: 209,
// height: 80,
// color: Colors.black,
// ),
// const Spacer(),
// ],
// ),
// ),
// ),
),
);
}
Container
listNamaCategory
(
double
widthScreen
)
{
return
Container
(
margin:
const
EdgeInsets
.
only
(
top:
22
,
left:
20
,
right:
20
),
height:
20
,
width:
widthScreen
,
child:
ListView
.
builder
(
scrollDirection:
Axis
.
horizontal
,
itemCount:
5
,
itemBuilder:
(
context
,
i
)
{
return
Container
(
margin:
const
EdgeInsets
.
only
(
right:
25
),
height:
20
,
width:
100
,
color:
Colors
.
black
,
);
}),
);
}
}
lib/ui/splash.dart
View file @
769f53cd
...
@@ -5,6 +5,7 @@ import 'dart:convert';
...
@@ -5,6 +5,7 @@ import 'dart:convert';
import
'package:byod/bloc/filter_menu.dart'
;
import
'package:byod/bloc/filter_menu.dart'
;
import
'package:byod/bloc/member_info.dart'
;
import
'package:byod/bloc/member_info.dart'
;
import
'package:byod/helper/helper.dart'
;
import
'package:byod/helper/helper.dart'
;
import
'package:byod/ui/home/shimmer_menu_new.dart'
;
import
'package:byod/ui/no_route.dart'
;
import
'package:byod/ui/no_route.dart'
;
import
'package:byod/ui/viewbill/view_bill_new.dart'
;
import
'package:byod/ui/viewbill/view_bill_new.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
...
@@ -139,10 +140,7 @@ class _SplashState extends State<Splash> {
...
@@ -139,10 +140,7 @@ class _SplashState extends State<Splash> {
// ),
// ),
// ),
// ),
body:
ScreenResponsive
(
body:
ScreenResponsive
(
widget:
ShimmerMenu
(
widget:
const
ShimmerMenuNew
(),
widthScreen:
widthScreen
,
maxWidthScreen:
maxWidthScreen
,
context:
context
),
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
widthScreen:
MediaQuery
.
of
(
context
).
size
.
width
,
isCoreLayout:
true
,
isCoreLayout:
true
,
),
),
...
...
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