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
486f6e83
Commit
486f6e83
authored
Aug 20, 2020
by
Mobile : Jetrin Phuekkaew (N'new)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update shop detail
parent
18c95738
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
181 additions
and
240 deletions
+181
-240
lib/main.dart
+2
-1
lib/service/api.dart
+1
-1
lib/ui/home/home.dart
+68
-39
lib/ui/nearme/near_me_list.dart
+2
-1
lib/ui/shop/shop_Nearby_places.dart
+2
-1
lib/ui/shop/shop_list_detail.dart
+93
-193
lib/ui/shop/shop_service.dart
+1
-1
lib/ui/shop/shoplistdetail_presenter.dart
+12
-3
No files found.
lib/main.dart
View file @
486f6e83
...
@@ -8,6 +8,7 @@ import 'package:feelverapp/ui/login/login.dart';
...
@@ -8,6 +8,7 @@ import 'package:feelverapp/ui/login/login.dart';
import
'package:feelverapp/ui/my_reviews/my_reviews_page.dart'
;
import
'package:feelverapp/ui/my_reviews/my_reviews_page.dart'
;
import
'package:feelverapp/ui/review_shop/review_shop_page.dart'
;
import
'package:feelverapp/ui/review_shop/review_shop_page.dart'
;
import
'package:feelverapp/ui/shop/shop_list.dart'
;
import
'package:feelverapp/ui/shop/shop_list.dart'
;
import
'package:feelverapp/ui/shop/shop_list_detail.dart'
;
import
'package:feelverapp/ui/shop/shop_main.dart'
;
import
'package:feelverapp/ui/shop/shop_main.dart'
;
import
'package:feelverapp/ui/splashscreen/splash_screen_page.dart'
;
import
'package:feelverapp/ui/splashscreen/splash_screen_page.dart'
;
...
@@ -32,7 +33,7 @@ class MyApp extends StatelessWidget {
...
@@ -32,7 +33,7 @@ class MyApp extends StatelessWidget {
),
),
home:
MainShop
()
home:
SplashScreenPage
()
...
...
lib/service/api.dart
View file @
486f6e83
...
@@ -29,7 +29,7 @@ class Api<T> {
...
@@ -29,7 +29,7 @@ class Api<T> {
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs"
,
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs"
,
};
};
static
final
String
baseApi
=
"https://backend-uat.feelver.com/api"
;
static
final
String
baseApi
=
"https://backend-uat.feelver.com/api
/storage/
"
;
Future
<
Response
<
T
>>
favorite
(
Object
body
)
async
{
Future
<
Response
<
T
>>
favorite
(
Object
body
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
...
...
lib/ui/home/home.dart
View file @
486f6e83
...
@@ -8,6 +8,7 @@ import 'package:feelverapp/ui/nearme/near_me_list.dart';
...
@@ -8,6 +8,7 @@ import 'package:feelverapp/ui/nearme/near_me_list.dart';
import
'package:feelverapp/ui/payment/payment_detail.dart'
;
import
'package:feelverapp/ui/payment/payment_detail.dart'
;
import
'package:feelverapp/ui/reserve/reserve_list.dart'
;
import
'package:feelverapp/ui/reserve/reserve_list.dart'
;
import
'package:feelverapp/ui/shop/shop_list.dart'
;
import
'package:feelverapp/ui/shop/shop_list.dart'
;
import
'package:feelverapp/ui/shop/shop_list_detail.dart'
;
import
'package:feelverapp/util/Accout_util.dart'
;
import
'package:feelverapp/util/Accout_util.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:flutter/cupertino.dart'
;
import
'package:flutter/cupertino.dart'
;
...
@@ -26,7 +27,7 @@ class HomePage extends StatefulWidget {
...
@@ -26,7 +27,7 @@ class HomePage extends StatefulWidget {
}
}
class
_HomePageState
extends
State
<
HomePage
>
with
TickerProviderStateMixin
{
class
_HomePageState
extends
State
<
HomePage
>
with
TickerProviderStateMixin
{
bool
search
=
false
;
bool
search
=
false
;
TabController
_tabController
;
TabController
_tabController
;
HomePresenter
presenter
;
HomePresenter
presenter
;
...
@@ -49,7 +50,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -49,7 +50,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
void
dispose
()
{
void
dispose
()
{
super
.
dispose
();
super
.
dispose
();
_tabController
.
dispose
();
_tabController
.
dispose
();
}
}
...
@@ -57,8 +57,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -57,8 +57,7 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
SizeConfig
(
context
);
SizeConfig
(
context
);
return
return
Scaffold
(
Scaffold
(
body:
_setupView
(),
body:
_setupView
(),
bottomNavigationBar:
Container
(
bottomNavigationBar:
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
...
@@ -138,7 +137,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -138,7 +137,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
onPressed:
()
{
onPressed:
()
{
Navigator
.
push
(
Navigator
.
push
(
context
,
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetail
()),
MaterialPageRoute
(
builder:
(
context
)
=>
Paymentdetail
()),
);
);
},
},
),
),
...
@@ -191,7 +191,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -191,7 +191,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
}
}
_setupView
()
{
_setupView
()
{
return
Column
(
return
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Stack
(
Stack
(
...
@@ -270,7 +269,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -270,7 +269,6 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
),
),
),
),
),
),
Positioned
(
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
top:
SizeConfig
.
getPadding
(
77
),
right:
SizeConfig
.
getPadding
(
20
),
right:
SizeConfig
.
getPadding
(
20
),
...
@@ -299,17 +297,22 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -299,17 +297,22 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
),
),
_searchField
(),
_searchField
(),
],
],
),
SizedBox
(
height:
20
,),
),
presenter
.
CatModel
==
null
?
Container
(
SizedBox
(
height:
20
,
),
presenter
.
CatModel
==
null
?
Container
(
child:
CircularProgressIndicator
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),),
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
),
),
):
search
?
_getlist
():
Expanded
(
),
)
:
search
?
_getlist
()
:
Expanded
(
child:
Container
(
child:
Container
(
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemCount:
presenter
.
CatModel
.
result
.
length
,
itemCount:
presenter
.
CatModel
.
result
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
...
@@ -321,7 +324,6 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -321,7 +324,6 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
);
);
}
}
list
(
int
index
)
{
list
(
int
index
)
{
return
Container
(
return
Container
(
//color: Colors.orange,
//color: Colors.orange,
...
@@ -358,7 +360,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -358,7 +360,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
);
);
}
}
Widget
_shopItem
(
String
title
,
String
image
,
String
address
,
String
detail
)
{
Widget
_shopItem
(
String
title
,
String
image
,
String
address
,
String
detail
,
String
id
)
{
return
Card
(
return
Card
(
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
...
@@ -374,7 +376,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -374,7 +376,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)
)
:
Image
.
network
(
:
Image
.
network
(
"https://backend-uat.feelver.com/storage/"
+
image
,
"https://backend-uat.feelver.com/storage/"
+
image
,
height:
SizeConfig
.
getWidth
(
180
),
height:
SizeConfig
.
getWidth
(
180
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
...
@@ -400,27 +402,50 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -400,27 +402,50 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
Positioned
(
Positioned
(
left:
SizeConfig
.
getPadding
(
75
),
left:
SizeConfig
.
getPadding
(
75
),
top:
SizeConfig
.
getPadding
(
190
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Text
(
child:
InkWell
(
child:
Text
(
title
,
title
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
color:
Colors
.
black
,
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),
),
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ShopListDetail
(
id:
id
)),
);
},
),
),
),
Positioned
(
Positioned
(
left:
SizeConfig
.
getPadding
(
280
),
left:
SizeConfig
.
getPadding
(
280
),
top:
SizeConfig
.
getPadding
(
190
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Icon
(
Icons
.
star
,
color:
Colors
.
orangeAccent
,
size:
SizeConfig
.
getFontSize
(
18
),),
child:
Icon
(
Icons
.
star
,
color:
Colors
.
orangeAccent
,
size:
SizeConfig
.
getFontSize
(
18
),
),
),
),
Positioned
(
Positioned
(
left:
SizeConfig
.
getPadding
(
300
),
left:
SizeConfig
.
getPadding
(
300
),
top:
SizeConfig
.
getPadding
(
190
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Text
(
child:
Text
(
"4.9"
,
presenter
.
searchhomeModel
.
thTH
[
0
].
star
.
toString
()
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
...
@@ -434,7 +459,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -434,7 +459,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
),
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
bottom:
SizeConfig
.
getPadding
(
14
),
bottom:
SizeConfig
.
getPadding
(
14
),
left:
SizeConfig
.
getPadding
(
24
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
)),
right:
SizeConfig
.
getPadding
(
24
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
...
@@ -458,13 +483,14 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -458,13 +483,14 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
fontWeight:
FontWeight
.
w500
),
fontWeight:
FontWeight
.
w500
),
),
),
),
),
SizedBox
(
height:
10
,)
SizedBox
(
height:
10
,
)
],
],
),
),
);
);
}
}
_getlist
()
{
_getlist
()
{
return
Expanded
(
return
Expanded
(
child:
Container
(
child:
Container
(
...
@@ -500,7 +526,11 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -500,7 +526,11 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
presenter
.
searchhomeModel
.
thTH
[
i
].
storeName
,
presenter
.
searchhomeModel
.
thTH
[
i
].
storeName
,
presenter
.
searchhomeModel
.
thTH
[
i
].
storeCover
,
presenter
.
searchhomeModel
.
thTH
[
i
].
storeCover
,
presenter
.
searchhomeModel
.
thTH
[
i
].
address
,
presenter
.
searchhomeModel
.
thTH
[
i
].
address
,
presenter
.
searchhomeModel
.
thTH
[
i
].
detail
==
null
?
""
:
presenter
.
searchhomeModel
.
thTH
[
i
].
detail
,);
presenter
.
searchhomeModel
.
thTH
[
i
].
detail
==
null
?
""
:
presenter
.
searchhomeModel
.
thTH
[
i
].
detail
,
presenter
.
searchhomeModel
.
thTH
[
i
].
id
.
toString
(),
);
}),
}),
),
),
);
);
...
@@ -511,7 +541,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -511,7 +541,7 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
onTap:
()
{
onTap:
()
{
presenter
.
getSearch
();
presenter
.
getSearch
();
setState
(()
{
setState
(()
{
search
=
true
;
search
=
true
;
});
});
},
},
child:
Container
(
child:
Container
(
...
@@ -528,15 +558,14 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -528,15 +558,14 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
child:
img
,
child:
img
,
),
),
Container
(
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10.0
,
left:
14
),
margin:
const
EdgeInsets
.
only
(
top:
10.0
,
left:
14
),
height:
SizeConfig
.
getHeight
(
110
),
height:
SizeConfig
.
getHeight
(
110
),
width:
SizeConfig
.
getWidth
(
320
),
width:
SizeConfig
.
getWidth
(
320
),
decoration:
BoxDecoration
(
decoration:
BoxDecoration
(
color:
Colors
.
transparent
,
//remove color to make it transpatent
color:
Colors
.
transparent
,
//remove color to make it transpatent
border:
Border
.
all
(
border:
Border
.
all
(
style:
BorderStyle
.
solid
,
style:
BorderStyle
.
solid
,
width:
2
,
color:
Colors
.
white
)),
width:
2
,
color:
Colors
.
white
)),
),
),
Container
(
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
...
@@ -590,20 +619,20 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
...
@@ -590,20 +619,20 @@ valueColor: new AlwaysStoppedAnimation<Color>(Color.fromRGBO(69, 85, 79, 1),),
),
),
suffixIcon:
IconButton
(
suffixIcon:
IconButton
(
onPressed:
()
{
onPressed:
()
{
presenter
.
searchCtrl
.
clear
();
presenter
.
searchCtrl
.
clear
();
},
},
icon:
Icon
(
Icons
.
clear
,
icon:
Icon
(
Icons
.
clear
,
color:
presenter
.
searchCtrl
==
null
?
Colors
.
transparent
:
Colors
.
black
)),
color:
presenter
.
searchCtrl
==
null
?
Colors
.
transparent
:
Colors
.
black
)),
prefixIcon:
IconButton
(
prefixIcon:
IconButton
(
onPressed:
()
{
onPressed:
()
{
setState
(()
{
setState
(()
{
search
=
true
;
search
=
true
;
print
(
search
);
print
(
search
);
});
});
presenter
.
getSearch
();
presenter
.
getSearch
();
},
},
icon:
Icon
(
Icons
.
search
,
color:
Colors
.
grey
)),
icon:
Icon
(
Icons
.
search
,
color:
Colors
.
grey
)),
filled:
true
,
filled:
true
,
hintText:
'ค้นหาแบบละเอียด'
,
hintText:
'ค้นหาแบบละเอียด'
,
...
...
lib/ui/nearme/near_me_list.dart
View file @
486f6e83
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/ui/nearme/near_me_detail.dart'
;
import
'package:feelverapp/ui/nearme/near_me_detail.dart'
;
import
'package:feelverapp/ui/nearme/near_me_list_presenter.dart'
;
import
'package:feelverapp/ui/nearme/near_me_list_presenter.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
import
'package:feelverapp/util/SizeConfig.dart'
;
...
@@ -217,7 +218,7 @@ class _NearmeListState extends State<NearmeList> with TickerProviderStateMixin {
...
@@ -217,7 +218,7 @@ class _NearmeListState extends State<NearmeList> with TickerProviderStateMixin {
),
),
Expanded
(
Expanded
(
child:
Image
.
network
(
child:
Image
.
network
(
'https://backend.feelver.com/storage/'
+
img
,
Api
.
baseApi
+
img
,
// width: SizeConfig.getWidth(50),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getHeight
(
160
),
height:
SizeConfig
.
getHeight
(
160
),
fit:
BoxFit
.
fitHeight
,
fit:
BoxFit
.
fitHeight
,
...
...
lib/ui/shop/shop_Nearby_places.dart
View file @
486f6e83
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/ui/nearme/near_me_detail.dart'
;
import
'package:feelverapp/ui/nearme/near_me_detail.dart'
;
import
'package:feelverapp/ui/nearme/near_me_list_presenter.dart'
;
import
'package:feelverapp/ui/nearme/near_me_list_presenter.dart'
;
import
'package:feelverapp/ui/shop/shop_main.dart'
;
import
'package:feelverapp/ui/shop/shop_main.dart'
;
...
@@ -234,7 +235,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
...
@@ -234,7 +235,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)
)
:
Image
.
network
(
:
Image
.
network
(
'https://backend.feelver.com/storage/'
+
img
,
Api
.
baseApi
+
img
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
),),
),),
),
),
...
...
lib/ui/shop/shop_list_detail.dart
View file @
486f6e83
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/ui/home/home.dart'
;
import
'package:feelverapp/ui/home/home.dart'
;
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/ui/shop/shoplistdetail_presenter.dart'
;
import
'package:feelverapp/ui/shop/shoplistdetail_presenter.dart'
;
...
@@ -6,6 +7,8 @@ import 'package:flutter/cupertino.dart';
...
@@ -6,6 +7,8 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
class
ShopListDetail
extends
StatefulWidget
{
class
ShopListDetail
extends
StatefulWidget
{
String
id
;
ShopListDetail
({
Key
key
,
this
.
id
,})
:
super
(
key:
key
);
@override
@override
_ShopListDetailState
createState
()
=>
_ShopListDetailState
();
_ShopListDetailState
createState
()
=>
_ShopListDetailState
();
}
}
...
@@ -17,9 +20,9 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -17,9 +20,9 @@ class _ShopListDetailState extends State<ShopListDetail> {
@override
@override
void
initState
()
{
void
initState
()
{
super
.
initState
();
super
.
initState
();
print
(
widget
.
id
);
presenter
=
ShoplistdetailPresenter
(
this
);
presenter
=
ShoplistdetailPresenter
(
this
);
presenter
.
Detai
();
presenter
.
Detai
(
widget
.
id
);
}
}
...
@@ -33,138 +36,14 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -33,138 +36,14 @@ class _ShopListDetailState extends State<ShopListDetail> {
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
SizeConfig
(
context
);
SizeConfig
(
context
);
return
Scaffold
(
return
Scaffold
(
body:
_setupView
(),
body:
presenter
.
model
==
null
?
Container
(
child:
bottomNavigationBar:
Container
(
Center
(
child:
CircularProgressIndicator
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
height:
SizeConfig
.
getWidth
(
80
),
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
child:
Row
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
16
),
top:
0
),
width:
SizeConfig
.
getWidth
(
60
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
IconButton
(
icon:
Image
.
asset
(
'assets/images/ic_home.png'
,
width:
SizeConfig
.
getWidth
(
24
),
height:
SizeConfig
.
getWidth
(
24
),
),
onPressed:
()
{
print
(
"Pressed"
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
HomePage
()),
);
},
),
Text
(
'หน้าแรก'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
16
),
top:
0
),
width:
SizeConfig
.
getWidth
(
100
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
IconButton
(
icon:
Image
.
asset
(
'assets/images/ic_list.png'
,
width:
SizeConfig
.
getWidth
(
24
),
height:
SizeConfig
.
getWidth
(
24
),
),
onPressed:
()
{
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => LoginPage()),
// );
print
(
"Pressed"
);
},
),
Text
(
'การจองของฉัน'
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
16
),
top:
0
),
width:
SizeConfig
.
getWidth
(
80
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
IconButton
(
icon:
Image
.
asset
(
'assets/images/ic_cart.png'
,
width:
SizeConfig
.
getWidth
(
24
),
height:
SizeConfig
.
getWidth
(
24
),
),
onPressed:
()
{
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => LoginPage()),
// );
},
),
Text
(
'รถเข็นของฉัน'
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
)
],
),
),
Container
(
margin:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
16
),
top:
0
,
right:
0
),
width:
SizeConfig
.
getWidth
(
60
),
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
<
Widget
>[
IconButton
(
icon:
Image
.
asset
(
'assets/images/ic_nearme.png'
,
width:
SizeConfig
.
getWidth
(
24
),
height:
SizeConfig
.
getWidth
(
24
),
),
onPressed:
()
{
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => LoginPage()),
// );
},
),
Text
(
'ใกล้ฉัน'
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
)
],
),
),
],
),
),
),
),),
):
_setupView
(),
);
);
}
}
...
@@ -176,7 +55,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -176,7 +55,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
height:
SizeConfig
.
getHeight
(
20
0
),
height:
SizeConfig
.
getHeight
(
15
0
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
),
),
Positioned
(
Positioned
(
...
@@ -204,47 +83,17 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -204,47 +83,17 @@ class _ShopListDetailState extends State<ShopListDetail> {
},
},
);
);
},
},
child:
Image
.
asset
(
child:
Icon
(
'assets/images/ic_menu.png'
,
Icons
.
keyboard_arrow_left
,
height:
SizeConfig
.
getWidth
(
24
),
color:
Colors
.
white
,
width:
SizeConfig
.
getWidth
(
30
),
size:
SizeConfig
.
getFontSize
(
24
),
fit:
BoxFit
.
cover
,
),
),
),
),
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
right:
SizeConfig
.
getPadding
(
60
),
child:
Container
(
child:
Image
.
asset
(
'assets/images/ic_noti.png'
,
height:
SizeConfig
.
getWidth
(
30
),
width:
SizeConfig
.
getWidth
(
30
),
fit:
BoxFit
.
cover
,
),
),
),
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
right:
SizeConfig
.
getPadding
(
20
),
child:
InkWell
(
// onTap: () {
// Navigator.push(
// context,
// MaterialPageRoute(builder: (context) => LoginPage()),
// );
// },
child:
Container
(
child:
Image
.
asset
(
'assets/images/ic_userimg.png'
,
height:
SizeConfig
.
getWidth
(
30
),
width:
SizeConfig
.
getWidth
(
30
),
fit:
BoxFit
.
cover
,
),
),
),
),
),
),
),
),
],
],
),
),
Container
(
Container
(
...
@@ -252,9 +101,9 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -252,9 +101,9 @@ class _ShopListDetailState extends State<ShopListDetail> {
child:
Stack
(
child:
Stack
(
children:
<
Widget
>[
children:
<
Widget
>[
Image
.
network
(
Image
.
network
(
'https://image.freepik.com/free-photo/girl-massage-spa-salon_110955-422.jpg'
,
presenter
.
model
.
result
[
0
].
storeCover
,
height:
SizeConfig
.
getWidth
(
1
8
0
),
height:
SizeConfig
.
getWidth
(
1
9
0
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
SizeConfig
.
getWidth
(
350
)
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
),
),
Positioned
(
Positioned
(
...
@@ -279,7 +128,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -279,7 +128,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
left:
SizeConfig
.
getPadding
(
75
),
left:
SizeConfig
.
getPadding
(
75
),
top:
SizeConfig
.
getPadding
(
190
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Text
(
child:
Text
(
'Ivory Relax and Spa'
,
presenter
.
model
.
result
[
0
].
storeName
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
...
@@ -293,12 +142,63 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -293,12 +142,63 @@ class _ShopListDetailState extends State<ShopListDetail> {
),
),
Container
(
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
bottom:
SizeConfig
.
getPadding
(
5
),
),
alignment:
Alignment
.
topLeft
,
child:
Text
(
'ข้อมูลติดต่อ'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
),
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
bottom:
SizeConfig
.
getPadding
(
15
)),
bottom:
SizeConfig
.
getPadding
(
15
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
'4/18, 4/21 BTS Nana Exit4 Sukhumvit Soi 8 , KlongToey Bangkok, Thailand 10110'
,
"โทร "
+
presenter
.
model
.
result
[
0
].
phone
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
bottom:
SizeConfig
.
getPadding
(
15
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
"email "
+
presenter
.
model
.
result
[
0
].
email
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
Container
(
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
),
bottom:
SizeConfig
.
getPadding
(
15
)),
alignment:
Alignment
.
topLeft
,
child:
Text
(
"ที่อยู่ "
+
presenter
.
model
.
result
[
0
].
address
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
grey
,
color:
Colors
.
grey
,
...
@@ -555,7 +455,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -555,7 +455,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
left:
SizeConfig
.
getPadding
(
45
),
left:
SizeConfig
.
getPadding
(
45
),
top:
SizeConfig
.
getPadding
(
50
),
top:
SizeConfig
.
getPadding
(
50
),
child:
Text
(
child:
Text
(
'4.9'
,
presenter
.
model
.
result
[
0
].
star
,
textAlign:
TextAlign
.
right
,
textAlign:
TextAlign
.
right
,
style:
TextStyle
(
style:
TextStyle
(
decoration:
TextDecoration
.
underline
,
decoration:
TextDecoration
.
underline
,
...
@@ -565,20 +465,20 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -565,20 +465,20 @@ class _ShopListDetailState extends State<ShopListDetail> {
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),
),
),
),
Positioned
(
//
Positioned(
left:
SizeConfig
.
getPadding
(
80
),
//
left: SizeConfig.getPadding(80),
top:
SizeConfig
.
getPadding
(
52
),
//
top: SizeConfig.getPadding(52),
child:
Text
(
//
child: Text(
'267 รีวิว'
,
//
'267 รีวิว',
textAlign:
TextAlign
.
right
,
//
textAlign: TextAlign.right,
style:
TextStyle
(
//
style: TextStyle(
// decoration: TextDecoration.underline,
//
//
decoration: TextDecoration.underline,
color:
Colors
.
black54
,
//
color: Colors.black54,
fontSize:
SizeConfig
.
getFontSize
(
12
),
//
fontSize: SizeConfig.getFontSize(12),
fontFamily:
"SF_Pro_Text"
,
//
fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w500
),
//
fontWeight: FontWeight.w500),
),
//
),
),
//
),
Positioned
(
Positioned
(
right:
SizeConfig
.
getPadding
(
20
),
right:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
52
),
top:
SizeConfig
.
getPadding
(
52
),
...
@@ -612,7 +512,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -612,7 +512,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
'ความคุ้มค่า'
'ความคุ้มค่า'
];
];
return
Container
(
return
Container
(
height:
8
0
,
height:
9
0
,
child:
GridView
.
count
(
child:
GridView
.
count
(
crossAxisCount:
4
,
crossAxisCount:
4
,
physics:
const
NeverScrollableScrollPhysics
(),
physics:
const
NeverScrollableScrollPhysics
(),
...
@@ -676,7 +576,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -676,7 +576,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
top:
SizeConfig
.
getPadding
(
10
),
top:
SizeConfig
.
getPadding
(
10
),
),
),
child:
Text
(
child:
Text
(
'ไม่ว่าคุณจะมาเยี่ยมเยียนเมืองเพลิดเพลินไปกับการพักผ่อนหรือคุณเป็นคนกรุงเทพฯตลอดไปสปาธรรมชาติของเราเป็นทางเลือกที่สมบูรณ์แบบหากคุณกำลังมองหาการผ่อนคลายความรู้สึกทั้งหมดในขณะที่เราปรนเปรอคุณด้วยสปาธรรมชาติ 100% และ ผลิตภัณฑ์สปาออร์แกนิก ทุกสิ่งที่คุณสัมผัสกลิ่นความรู้สึกการได้ยินและประสบการณ์นั้นเป็นเรื่องจริงและเป็นธรรมชาติอย่างที่ได้รับการเดินทางครั้งใหญ่จากความเร่งรีบและวุ่นวายของกรุงเทพฯที่วุ่นวายและความวุ่นวายของชีวิตสมัยใหม่! ด้วยเสียงมลภาวะความวุ่นวายและสารเคมีที่กลายเป็นบรรทัดฐานในการใช้ชีวิตในเมืองข้อเสนอของสปาของเราจึงเป็นสิ่งที่ต้องการ ดังนั้นอย่าลืมที่จะได้รับ Plant Day Spa อันสดใหม่ของคุณ'
,
presenter
.
model
.
result
[
0
].
excerpt
,
textAlign:
TextAlign
.
left
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
style:
TextStyle
(
// decoration: TextDecoration.underline,
// decoration: TextDecoration.underline,
...
...
lib/ui/shop/shop_service.dart
View file @
486f6e83
...
@@ -76,7 +76,7 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -76,7 +76,7 @@ class _ShopServicePageState extends State<ShopServicePage>
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)
)
:
Image
.
network
(
:
Image
.
network
(
'https://backend.feelver.com/storage/'
+
image
,
Api
.
baseApi
+
image
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
),),
),),
),
),
...
...
lib/ui/shop/shoplistdetail_presenter.dart
View file @
486f6e83
import
'package:feelverapp/model/shoplistdetail/shoplistdetail_Model.dart'
;
import
'package:feelverapp/model/shoplistdetail/shoplistdetail_Model.dart'
;
import
'package:feelverapp/service/Loading.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/service/base_presenter.dart'
;
import
'package:feelverapp/service/base_presenter.dart'
;
import
'package:feelverapp/ui/shop/shop_list_detail.dart'
;
import
'package:feelverapp/ui/shop/shop_list_detail.dart'
;
...
@@ -8,16 +9,24 @@ import 'package:flutter/material.dart';
...
@@ -8,16 +9,24 @@ import 'package:flutter/material.dart';
class
ShoplistdetailPresenter
extends
BasePresenter
<
ShopListDetail
>{
class
ShoplistdetailPresenter
extends
BasePresenter
<
ShopListDetail
>{
Api
_api
;
Api
_api
;
final
formkey
=
GlobalKey
<
FormState
>();
final
formkey
=
GlobalKey
<
FormState
>();
shoplistdetailModel
model
;
ShoplistdetailPresenter
(
State
<
ShopListDetail
>
state
)
:
super
(
state
);
ShoplistdetailPresenter
(
State
<
ShopListDetail
>
state
)
:
super
(
state
);
Detai
()
async
{
Detai
(
String
id
)
async
{
_api
=
Api
<
shoplistdetailModel
>();
_api
=
Api
<
shoplistdetailModel
>();
var
res
=
await
_api
.
shoplistDetail
({
var
res
=
await
_api
.
shoplistDetail
({
"id"
:
"406"
,
"id"
:
id
,
});
});
if
(
res
.
fail
==
null
)
{
if
(
res
.
fail
==
null
)
{
setState
(()
{
model
=
res
.
success
;
print
(
"complete"
);
});
print
(
'res Success'
);
print
(
'res Success'
);
}
else
{
}
else
{
print
(
'res Fail'
);
print
(
'res Fail'
);
...
...
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