Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
feelver
Overview
Overview
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
2F-ART
feelver
Commits
22f9b54e
Commit
22f9b54e
authored
Aug 19, 2020
by
Mobile : Ball (Apprentice)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
43f467db
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
51 deletions
+79
-51
lib/main.dart
+1
-1
lib/service/api.dart
+1
-1
lib/ui/favorite/favorite.dart
+19
-18
lib/ui/review_shop/review_shop_page.dart
+58
-31
No files found.
lib/main.dart
View file @
22f9b54e
...
@@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
...
@@ -32,7 +32,7 @@ class MyApp extends StatelessWidget {
),
),
home:
SplashScreen
Page
()
home:
ReviewShop
Page
()
//home: EditProfile(),
//home: EditProfile(),
...
...
lib/service/api.dart
View file @
22f9b54e
...
@@ -44,7 +44,7 @@ class Api<T> {
...
@@ -44,7 +44,7 @@ class Api<T> {
}
else
{
}
else
{
_fail
=
FailModel
.
fromJson
(
json
.
decode
(
response
.
body
));
_fail
=
FailModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
}
result
=
new
Response
(
_model
,
_fail
);
result
=
new
Response
<
T
>
(
_model
,
_fail
);
});
});
return
result
;
return
result
;
}
}
...
...
lib/ui/favorite/favorite.dart
View file @
22f9b54e
...
@@ -9,10 +9,9 @@ class Favorite extends StatefulWidget {
...
@@ -9,10 +9,9 @@ class Favorite extends StatefulWidget {
_FavoriteState
createState
()
=>
_FavoriteState
();
_FavoriteState
createState
()
=>
_FavoriteState
();
}
}
class
_FavoriteState
extends
State
<
Favorite
>
with
TickerProviderStateMixin
{
class
_FavoriteState
extends
State
<
Favorite
>
{
bool
checkBoxValue
=
false
;
bool
checkBoxValue
=
false
;
FavoritePresenter
presenter
;
FavoritePresenter
presenter
;
@override
@override
...
@@ -36,7 +35,6 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -36,7 +35,6 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
bottomNavigationBar:
Container
(
bottomNavigationBar:
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
height:
SizeConfig
.
getHeight
(
100
),
height:
SizeConfig
.
getHeight
(
100
),
),
),
);
);
}
}
...
@@ -60,17 +58,21 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -60,17 +58,21 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
bottom:
10
,
bottom:
10
,
),
),
child:
Container
(
child:
Container
(
child:
ListView
.
builder
(
child:
presenter
.
favoriteModel
==
null
itemCount:
5
,
?
Container
()
:
ListView
.
builder
(
itemCount:
presenter
.
favoriteModel
.
wishListItem
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
return
list
();
return
list
(
i
);
}),
}),
),
),
),
),
);
);
}
}
Widget
list
()
{
Widget
list
(
int
index
)
{
return
Container
(
return
Container
(
// color: Colors.red,
// color: Colors.red,
margin:
EdgeInsets
.
only
(
bottom:
15
),
margin:
EdgeInsets
.
only
(
bottom:
15
),
...
@@ -81,9 +83,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -81,9 +83,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
Padding
(
presenter
.
favoriteModel
==
null
padding:
const
EdgeInsets
.
only
(
left:
10
),
child:
presenter
.
favoriteModel
==
null
?
Image
.
asset
(
?
Image
.
asset
(
'assets/images/demo_img.png'
,
'assets/images/demo_img.png'
,
width:
SizeConfig
.
getWidth
(
110
),
width:
SizeConfig
.
getWidth
(
110
),
...
@@ -91,12 +91,11 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -91,12 +91,11 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
fit:
BoxFit
.
fitWidth
,
fit:
BoxFit
.
fitWidth
,
)
)
:
Image
.
network
(
:
Image
.
network
(
presenter
.
favoriteModel
.
wishListItem
[
0
].
product
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
cover
,
.
cover
,
width:
SizeConfig
.
getWidth
(
110
),
width:
SizeConfig
.
getWidth
(
110
),
height:
SizeConfig
.
getHeight
(
150
),
height:
SizeConfig
.
getHeight
(
150
),
fit:
BoxFit
.
fitWidth
,
fit:
BoxFit
.
fitWidth
,
)
),
),
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
...
@@ -111,7 +110,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -111,7 +110,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
child:
Row
(
child:
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Text
(
Text
(
'Ivory Relax and Spa'
,
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
name
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
15
)),
fontSize:
SizeConfig
.
getFontSize
(
15
)),
...
@@ -132,7 +131,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -132,7 +131,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
child:
Text
(
'นวดเเผนไทย'
,
child:
Text
(
'นวดเเผนไทย'
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
)),
)
,
),
),
),
SizedBox
(
SizedBox
(
height:
SizeConfig
.
getHeight
(
5
),
height:
SizeConfig
.
getHeight
(
5
),
...
@@ -149,14 +148,14 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -149,14 +148,14 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
SizedBox
(
SizedBox
(
width:
SizeConfig
.
getWidth
(
5
),
width:
SizeConfig
.
getWidth
(
5
),
),
),
Text
(
'90 นาที'
),
Text
(
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
duration
),
Spacer
(),
Spacer
(),
Icon
(
Icon
(
Icons
.
local_offer
,
Icons
.
local_offer
,
color:
Color
(
0xFFEEAFB7
),
color:
Color
(
0xFFEEAFB7
),
),
),
Text
(
Text
(
'฿1,599.00'
,
"฿"
+
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
specialPrice
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
lineThrough
,
decoration:
TextDecoration
.
lineThrough
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontSize:
SizeConfig
.
getFontSize
(
16
),
...
@@ -176,7 +175,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -176,7 +175,7 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
children:
<
Widget
>[
children:
<
Widget
>[
Spacer
(),
Spacer
(),
Text
(
Text
(
'฿1,200.00'
,
"฿"
+
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
price
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
SizeConfig
.
getFontSize
(
20
),
fontSize:
SizeConfig
.
getFontSize
(
20
),
color:
Color
(
0xFFFD2956
),
color:
Color
(
0xFFFD2956
),
...
@@ -193,12 +192,14 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -193,12 +192,14 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
),
),
],
],
),
),
],
],
),
),
),
),
);
);
}
}
Widget
header
()
{
Widget
header
()
{
return
Container
(
return
Container
(
child:
Stack
(
child:
Stack
(
...
...
lib/ui/review_shop/review_shop_page.dart
View file @
22f9b54e
...
@@ -36,47 +36,39 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
...
@@ -36,47 +36,39 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
texttop
(),
texttop
(),
star
(),
containt
(),
containt
(),
],
],
),
),
);
);
}
}
Widget
texttop
(){
Widget
containt
()
{
return
Container
(
return
Expanded
(
margin:
EdgeInsets
.
only
(
child:
Container
(
right:
SizeConfig
.
getPadding
(
16
),
child:
ListView
.
builder
(
left:
SizeConfig
.
getPadding
(
16
),
itemCount:
3
,
top:
SizeConfig
.
getPadding
(
5
),
itemBuilder:
(
context
,
i
)
{
bottom:
SizeConfig
.
getPadding
(
10
)),
return
list
();
child:
Row
(
}),
children:
<
Widget
>[
Text
(
'รีวิว(จากผู้ใช้บริการจริง)'
,
style:
TextStyle
(
color:
Color
(
0xFF6AB3AA
),
fontSize:
SizeConfig
.
getFontSize
(
14
),
),
),
Spacer
(),
],
),
),
);
);
}
}
Widget
containt
(){
Widget
star
()
{
return
Card
(
return
Container
(
// color: Colors.blue,
margin:
EdgeInsets
.
only
(
margin:
EdgeInsets
.
only
(
right:
SizeConfig
.
getPadding
(
16
),
right:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
top:
SizeConfig
.
getPadding
(
2
0
),
top:
SizeConfig
.
getPadding
(
1
0
),
bottom:
SizeConfig
.
getPadding
(
10
)),
bottom:
SizeConfig
.
getPadding
(
10
)),
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
only
(
// color: Colors.red,
padding:
EdgeInsets
.
only
(
right:
SizeConfig
.
getPadding
(
15
),
right:
SizeConfig
.
getPadding
(
15
),
left:
SizeConfig
.
getPadding
(
15
),
left:
SizeConfig
.
getPadding
(
15
),
bottom:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
10
),
top:
SizeConfig
.
getPadding
(
20
),
),
),
// color: Colors.blueGrey,
// color: Colors.blueGrey,
child:
Column
(
child:
Column
(
...
@@ -229,9 +221,25 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
...
@@ -229,9 +221,25 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
Divider
(
Divider
(
color:
Color
(
0xFF606060
),
color:
Color
(
0xFF606060
),
),
),
Container
(
],
color:
Colors
.
deepPurpleAccent
,
),
child:
Row
(
),
);
}
Widget
list
()
{
return
Card
(
child:
Container
(
// color: Colors.deepPurpleAccent,
margin:
EdgeInsets
.
only
(
right:
SizeConfig
.
getPadding
(
20
),
left:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
10
),
bottom:
SizeConfig
.
getPadding
(
10
),
),
child:
Column
(
children:
<
Widget
>[
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
ClipRRect
(
ClipRRect
(
borderRadius:
BorderRadius
.
circular
(
50
),
borderRadius:
BorderRadius
.
circular
(
50
),
...
@@ -247,7 +255,7 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
...
@@ -247,7 +255,7 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
),
),
Expanded
(
Expanded
(
child:
Container
(
child:
Container
(
color:
Colors
.
green
,
//
color: Colors.green,
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
...
@@ -295,9 +303,8 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
...
@@ -295,9 +303,8 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
),
),
],
],
),
),
),
Container
(
Container
(
color:
Colors
.
blue
,
//
color: Colors.blue,
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Padding
(
Padding
(
...
@@ -356,9 +363,29 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
...
@@ -356,9 +363,29 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
),
),
),
),
],
],
)),
);
}
Widget
texttop
()
{
return
Container
(
margin:
EdgeInsets
.
only
(
right:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
top:
SizeConfig
.
getPadding
(
15
),
bottom:
SizeConfig
.
getPadding
(
5
)),
child:
Row
(
children:
<
Widget
>[
Text
(
'รีวิว(จากผู้ใช้บริการจริง)'
,
style:
TextStyle
(
color:
Color
(
0xFF6AB3AA
),
fontSize:
SizeConfig
.
getFontSize
(
14
),
),
),
),
),
Spacer
(),
],
),
);
);
}
}
}
}
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