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
6bb31c96
Commit
6bb31c96
authored
Aug 20, 2020
by
Mobile : Art
Browse files
Options
Browse Files
Download
Plain Diff
update
parents
15596b8b
17b588a0
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
604 additions
and
452 deletions
+604
-452
lib/main.dart
+2
-0
lib/model/category/category_model.dart
+33
-31
lib/service/api.dart
+14
-13
lib/ui/favorite/favorite.dart
+29
-28
lib/ui/home/home.dart
+239
-27
lib/ui/home/home_presenter.dart
+15
-10
lib/ui/review_shop/review_shop_page.dart
+108
-81
lib/ui/shop/shop_Nearby_places.dart
+130
-118
lib/ui/shop/shop_list.dart
+20
-98
lib/ui/shop/shop_main.dart
+1
-0
lib/ui/shop/shop_service.dart
+3
-1
pubspec.lock
+10
-45
No files found.
lib/main.dart
View file @
6bb31c96
...
@@ -34,6 +34,8 @@ class MyApp extends StatelessWidget {
...
@@ -34,6 +34,8 @@ class MyApp extends StatelessWidget {
home:
MainShop
()
home:
MainShop
()
//home: EditProfile(),
//home: EditProfile(),
);
);
...
...
lib/model/category/category_model.dart
View file @
6bb31c96
class
CategoryModel
{
List
<
Result
>
result
;
class
categoryModel
{
CategoryModel
({
this
.
result
});
List
<
DATA
>
dATA
;
categoryModel
({
this
.
dATA
});
c
ategoryModel
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
C
ategoryModel
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'
DATA
'
]
!=
null
)
{
if
(
json
[
'
result
'
]
!=
null
)
{
dATA
=
new
List
<
DATA
>();
result
=
new
List
<
Result
>();
json
[
'
DATA
'
].
forEach
((
v
)
{
json
[
'
result
'
].
forEach
((
v
)
{
dATA
.
add
(
new
DATA
.
fromJson
(
v
));
result
.
add
(
new
Result
.
fromJson
(
v
));
});
});
}
}
}
}
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
final
Map
<
String
,
dynamic
>
data
=
new
Map
<
String
,
dynamic
>();
if
(
this
.
dATA
!=
null
)
{
data
[
'DATA'
]
=
this
.
dATA
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
if
(
this
.
result
!=
null
)
{
data
[
'result'
]
=
this
.
result
.
map
((
v
)
=>
v
.
toJson
()).
toList
();
}
}
return
data
;
return
data
;
}
}
}
}
class
DATA
{
class
Result
{
int
id
;
int
id
;
int
parentId
;
int
parentId
;
String
name
;
String
name
;
...
@@ -30,33 +31,34 @@ class DATA {
...
@@ -30,33 +31,34 @@ class DATA {
String
displayName
;
String
displayName
;
String
cover
;
String
cover
;
String
detail
;
String
detail
;
dynamic
type
;
Null
type
;
String
status
;
String
status
;
int
sortOrder
;
int
sortOrder
;
dynamic
storeId
;
Null
storeId
;
dynamic
vendorId
;
Null
vendorId
;
dynamic
createdAt
;
Null
createdAt
;
String
updatedAt
;
String
updatedAt
;
String
visibility
;
String
visibility
;
DATA
(
Result
(
{
this
.
id
,
{
this
.
id
,
this
.
parentId
,
this
.
parentId
,
this
.
name
,
this
.
name
,
this
.
code
,
this
.
code
,
this
.
displayName
,
this
.
displayName
,
this
.
cover
,
this
.
cover
,
this
.
detail
,
this
.
detail
,
this
.
type
,
this
.
type
,
this
.
status
,
this
.
status
,
this
.
sortOrder
,
this
.
sortOrder
,
this
.
storeId
,
this
.
storeId
,
this
.
vendorId
,
this
.
vendorId
,
this
.
createdAt
,
this
.
createdAt
,
this
.
updatedAt
,
this
.
updatedAt
,
this
.
visibility
});
this
.
visibility
});
DATA
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
Result
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
id
=
json
[
'id'
];
parentId
=
json
[
'parent_id'
];
parentId
=
json
[
'parent_id'
];
name
=
json
[
'name'
];
name
=
json
[
'name'
];
...
...
lib/service/api.dart
View file @
6bb31c96
...
@@ -22,14 +22,14 @@ import 'package:feelverapp/model/shopservice/shop_service_Model.dart';
...
@@ -22,14 +22,14 @@ import 'package:feelverapp/model/shopservice/shop_service_Model.dart';
import
'package:http/http.dart'
as
http
;
import
'package:http/http.dart'
as
http
;
class
Api
<
T
>
{
class
Api
<
T
>
{
final
String
_baseApi
=
"https://backend-uat.feelver.com/api"
;
final
String
_baseApi
=
"https://backend-uat.feelver.com/api"
;
final
_headerApi
=
{
final
_headerApi
=
{
"Authorization"
:
"Authorization"
:
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs"
,
"Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvYmFja2VuZC11YXQuZmVlbHZlci5jb21cL2FwaVwvbG9naW4iLCJpYXQiOjE1OTYxMDAzNTgsImV4cCI6MTYwMzMwMDM1OCwibmJmIjoxNTk2MTAwMzU4LCJqdGkiOiJ2YjA2S0FHR1JtZDFseEw1Iiwic3ViIjozNzMsInBydiI6Ijg3ZTBhZjFlZjlmZDE1ODEyZmRlYzk3MTUzYTE0ZTBiMDQ3NTQ2YWEifQ.UkY70AshvW5O4M63XY_Iv2IPBohSUUwnRF1oi46p2zs"
,
};
};
static
final
String
baseApi
=
"https://backend-uat.feelver.com/api"
;
Future
<
Response
<
T
>>
favorite
(
Object
body
)
async
{
Future
<
Response
<
T
>>
favorite
(
Object
body
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
...
@@ -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
;
}
}
...
@@ -95,12 +95,12 @@ class Api<T> {
...
@@ -95,12 +95,12 @@ class Api<T> {
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
var
result
;
var
result
;
print
(
"this is body "
+
body
.
toString
());
//
print("this is body " + body.toString());
// (body as Map)['lang'] = allTranslations.currentLanguage;
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
_httpConnection
(
await
_httpConnection
(
"
${this._baseApi}
/customer/info"
,
this
.
_headerApi
,
body
)
"
${this._baseApi}
/customer/info"
,
this
.
_headerApi
,
body
)
.
then
((
response
)
{
.
then
((
response
)
{
print
(
"ผลลัพ เท่ากับบบบ "
+
"
${response.body}
"
);
//
print("ผลลัพ เท่ากับบบบ " + "${response.body}");
if
(
response
.
statusCode
==
200
)
{
if
(
response
.
statusCode
==
200
)
{
_model
=
GetprofileModel
.
fromJson
(
json
.
decode
(
response
.
body
));
_model
=
GetprofileModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
else
{
}
else
{
...
@@ -220,21 +220,18 @@ class Api<T> {
...
@@ -220,21 +220,18 @@ class Api<T> {
return
result
;
return
result
;
}
}
Future
<
Response
<
T
>>
category
(
Object
body
)
async
{
Future
<
Response
<
T
>>
category
(
Object
body
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
var
result
;
var
result
;
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
_httpConnection
(
"
${this._baseApi}
/category"
,
this
.
_headerApi
,
body
)
await
_httpConnection
(
"
${this._baseApi}
/category"
,
this
.
_headerApi
,
body
)
.
then
((
response
)
{
.
then
((
response
)
{
print
(
"ผลลัพ
ท์ เท่ากับ55555 "
"
${response.body}
"
);
print
(
"ผลลัพ
เท่ากับบบบ "
+
"
${response.body}
"
);
if
(
response
.
statusCode
==
200
)
{
if
(
response
.
statusCode
==
200
)
{
// Array to Map Json
_model
=
CategoryModel
.
fromJson
(
json
.
decode
(
response
.
body
));
Map
<
String
,
dynamic
>
myData
=
arrayToJson
(
response
.
body
);
_model
=
categoryModel
.
fromJson
(
myData
);
print
(
'myModel '
+
_model
);
}
else
{
}
else
{
_fail
=
FailModel
.
fromJson
(
json
.
decode
(
response
.
body
));
_fail
=
FailModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
}
...
@@ -243,6 +240,10 @@ class Api<T> {
...
@@ -243,6 +240,10 @@ class Api<T> {
return
result
;
return
result
;
}
}
Future
<
Response
<
T
>>
shoplist
(
Object
body
)
async
{
Future
<
Response
<
T
>>
shoplist
(
Object
body
)
async
{
var
_model
;
var
_model
;
var
_fail
;
var
_fail
;
...
...
lib/ui/favorite/favorite.dart
View file @
6bb31c96
...
@@ -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,22 +83,19 @@ class _FavoriteState extends State<Favorite> with TickerProviderStateMixin {
...
@@ -81,22 +83,19 @@ 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
),
?
Image
.
asset
(
child:
presenter
.
favoriteModel
==
null
'assets/images/demo_img.png'
,
?
Image
.
asset
(
width:
SizeConfig
.
getWidth
(
110
),
'assets/images/demo_img.png'
,
height:
SizeConfig
.
getHeight
(
150
),
width:
SizeConfig
.
getWidth
(
110
),
fit:
BoxFit
.
fitWidth
,
height:
SizeConfig
.
getHeight
(
150
),
)
fit:
BoxFit
.
fitWidth
,
:
Image
.
network
(
)
presenter
.
favoriteModel
.
wishListItem
[
index
].
product
.
cover
,
:
Image
.
network
(
width:
SizeConfig
.
getWidth
(
110
),
presenter
.
favoriteModel
.
wishListItem
[
0
].
product
height:
SizeConfig
.
getHeight
(
150
),
.
cover
,
fit:
BoxFit
.
fitWidth
,
width:
SizeConfig
.
getWidth
(
110
),
),
height:
SizeConfig
.
getHeight
(
150
),
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/home/home.dart
View file @
6bb31c96
import
'package:feelverapp/model/category/category_model.dart'
;
import
'package:feelverapp/model/category/category_model.dart'
;
import
'package:feelverapp/service/Loading.dart'
;
import
'package:feelverapp/service/api.dart'
;
import
'package:feelverapp/ui/home/home_presenter.dart'
;
import
'package:feelverapp/ui/home/home_presenter.dart'
;
import
'package:feelverapp/ui/login/login.dart'
;
import
'package:feelverapp/ui/login/login.dart'
;
import
'package:feelverapp/ui/menu/menu.dart'
;
import
'package:feelverapp/ui/menu/menu.dart'
;
...
@@ -24,7 +26,7 @@ class HomePage extends StatefulWidget {
...
@@ -24,7 +26,7 @@ class HomePage extends StatefulWidget {
}
}
class
_HomePageState
extends
State
<
HomePage
>
with
TickerProviderStateMixin
{
class
_HomePageState
extends
State
<
HomePage
>
with
TickerProviderStateMixin
{
bool
search
=
false
;
TabController
_tabController
;
TabController
_tabController
;
HomePresenter
presenter
;
HomePresenter
presenter
;
...
@@ -36,10 +38,11 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -36,10 +38,11 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
presenter
.
Listitem
();
presenter
.
Listitem
();
// presenter.getid();
// presenter.getid();
// presenter.getprofile();
presenter
.
getprofile
();
//print("nenwenwenwew"+presenter.CatModel.dATA[0].cover,);
//
presenter.getSearch();
//
presenter.getSearch();
}
}
@override
@override
...
@@ -53,7 +56,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -53,7 +56,9 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
SizeConfig
(
context
);
SizeConfig
(
context
);
return
Scaffold
(
return
Scaffold
(
body:
_setupView
(),
body:
_setupView
(),
bottomNavigationBar:
Container
(
bottomNavigationBar:
Container
(
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
color:
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
...
@@ -186,7 +191,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -186,7 +191,8 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
}
}
_setupView
()
{
_setupView
()
{
return
Column
(
return
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Stack
(
Stack
(
children:
<
Widget
>[
children:
<
Widget
>[
...
@@ -264,13 +270,48 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -264,13 +270,48 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
),
),
),
),
),
),
Positioned
(
top:
SizeConfig
.
getPadding
(
77
),
right:
SizeConfig
.
getPadding
(
20
),
child:
InkWell
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
LoginPage
()),
);
},
child:
presenter
.
getmodel
==
null
?
Container
()
:
Container
(
child:
ClipRRect
(
borderRadius:
BorderRadius
.
all
(
Radius
.
circular
(
SizeConfig
.
getWidth
(
56
))),
child:
Image
.
network
(
presenter
.
getmodel
.
result
[
0
].
image
,
fit:
BoxFit
.
contain
,
width:
SizeConfig
.
getWidth
(
30
),
height:
SizeConfig
.
getWidth
(
30
),
),
),
),
),
),
_searchField
(),
_searchField
(),
],
],
),
),
SizedBox
(
height:
20
,),
Expanded
(
presenter
.
CatModel
==
null
?
Container
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),),
),
):
search
?
_getlist
():
Expanded
(
child:
Container
(
child:
Container
(
child:
presenter
.
CatModel
==
null
?
Container
()
:
ListView
.
builder
(
itemCount:
presenter
.
CatModel
.
dATA
[
0
].
name
.
length
,
child:
ListView
.
builder
(
itemCount:
presenter
.
CatModel
.
result
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
return
list
(
i
);
return
list
(
i
);
}),
}),
...
@@ -283,12 +324,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -283,12 +324,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
list
(
int
index
)
{
list
(
int
index
)
{
return
Container
(
return
Container
(
padding:
EdgeInsets
.
only
(
//color: Colors.orange,
top:
SizeConfig
.
getPadding
(
16
),
// padding: EdgeInsets.only(
left
:
SizeConfig
.
getPadding
(
16
),
// // top
: SizeConfig.getPadding(16),
right:
SizeConfig
.
getPadding
(
16
),
bottom:
SizeConfig
.
getPadding
(
10
),
// //
bottom: SizeConfig.getPadding(10),
),
//
),
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
_listItem
(
_listItem
(
...
@@ -300,12 +341,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -300,12 +341,12 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
fit:
BoxFit
.
fill
,
fit:
BoxFit
.
fill
,
)
)
:
Image
.
network
(
:
Image
.
network
(
presenter
.
CatModel
.
dATA
[
index
].
cover
,
presenter
.
CatModel
.
result
[
index
].
cover
,
height:
SizeConfig
.
get
Width
(
130
),
height:
SizeConfig
.
get
Height
(
130
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
),
),
presenter
.
CatModel
.
dATA
[
index
].
name
,
presenter
.
CatModel
.
result
[
index
].
name
,
''
,
''
,
ShopList
(),
ShopList
(),
),
),
...
@@ -317,19 +358,167 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -317,19 +358,167 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
);
);
}
}
Widget
_shopItem
(
String
title
,
String
image
,
String
address
,
String
detail
)
{
return
Card
(
child:
Column
(
children:
<
Widget
>[
Container
(
height:
SizeConfig
.
getHeight
(
270
),
child:
Stack
(
children:
<
Widget
>[
presenter
.
searchhomeModel
==
null
?
Image
.
network
(
'https://image.freepik.com/free-photo/girl-massage-spa-salon_110955-422.jpg'
,
height:
SizeConfig
.
getWidth
(
180
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
fit:
BoxFit
.
cover
,
)
:
Image
.
network
(
"https://backend-uat.feelver.com/storage/"
+
image
,
height:
SizeConfig
.
getWidth
(
180
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
fit:
BoxFit
.
cover
,
),
Positioned
(
right:
SizeConfig
.
getPadding
(
16
),
top:
SizeConfig
.
getPadding
(
16
),
child:
ImageIcon
(
AssetImage
(
'assets/images/ic_fav_list.png'
),
color:
Colors
.
white
,
size:
SizeConfig
.
getFontSize
(
30
),
),
),
Positioned
(
left:
SizeConfig
.
getPadding
(
16
),
top:
SizeConfig
.
getPadding
(
165
),
child:
Image
.
asset
(
'assets/images/pin_list.png'
,
width:
SizeConfig
.
getWidth
(
50
),
height:
SizeConfig
.
getWidth
(
50
),
),
),
Positioned
(
left:
SizeConfig
.
getPadding
(
75
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Text
(
title
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
),
Positioned
(
left:
SizeConfig
.
getPadding
(
280
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Icon
(
Icons
.
star
,
color:
Colors
.
orangeAccent
,
size:
SizeConfig
.
getFontSize
(
18
),),
),
Positioned
(
left:
SizeConfig
.
getPadding
(
300
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Text
(
"4.9"
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
),
],
),
),
Container
(
padding:
EdgeInsets
.
only
(
bottom:
SizeConfig
.
getPadding
(
14
),
left:
SizeConfig
.
getPadding
(
24
),
right:
SizeConfig
.
getPadding
(
24
)),
alignment:
Alignment
.
topLeft
,
child:
presenter
.
searchhomeModel
==
null
?
Text
(
""
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
)
:
Text
(
address
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
grey
,
fontSize:
SizeConfig
.
getFontSize
(
10
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
),
SizedBox
(
height:
10
,)
],
),
);
}
_getlist
()
{
return
Expanded
(
child:
Container
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
right:
SizeConfig
.
getPadding
(
16
),
bottom:
SizeConfig
.
getPadding
(
10
),
),
child:
presenter
.
searchhomeModel
==
null
?
Container
()
:
ListView
.
builder
(
itemCount:
presenter
.
searchhomeModel
.
thTH
[
0
].
storeCode
.
length
,
itemBuilder:
(
context
,
i
)
{
// new RaisedButton(
// child: new Text(
// 'Load more ...',
// style: new TextStyle(
// color: Colors.black,
// fontWeight: FontWeight.bold,
// ),
// ),
// onPressed: () {
// var nextItems = new List<String>.generate(2, (i) {
// var itemId = i + presenter.shopModel.dATA[i].storeName.length;
// return "Item $itemId";
// });
// setState(() {
// entries.addAll(nextItems);
// });
// });
return
_shopItem
(
presenter
.
searchhomeModel
.
thTH
[
i
].
storeName
,
presenter
.
searchhomeModel
.
thTH
[
i
].
storeCover
,
presenter
.
searchhomeModel
.
thTH
[
i
].
address
,
presenter
.
searchhomeModel
.
thTH
[
i
].
detail
==
null
?
""
:
presenter
.
searchhomeModel
.
thTH
[
i
].
detail
,);
}),
),
);
}
Widget
_listItem
(
Image
img
,
String
title
,
String
view
,
Widget
page
)
{
Widget
_listItem
(
Image
img
,
String
title
,
String
view
,
Widget
page
)
{
return
GestureDetector
(
return
GestureDetector
(
onTap:
()
{
onTap:
()
{
Navigator
.
push
(
presenter
.
getSearch
();
context
,
setState
(()
{
MaterialPageRoute
(
search
=
true
;
builder:
(
context
)
=>
page
,
});
),
);
},
},
child:
Container
(
child:
Container
(
margin:
EdgeInsets
.
all
(
margin:
EdgeInsets
.
only
(
SizeConfig
.
getPadding
(
24
),
bottom:
8
,
left:
SizeConfig
.
getPadding
(
15
),
right:
SizeConfig
.
getPadding
(
15
),
),
),
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
child:
Stack
(
child:
Stack
(
...
@@ -338,6 +527,17 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -338,6 +527,17 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
width:
MediaQuery
.
of
(
context
).
size
.
width
,
width:
MediaQuery
.
of
(
context
).
size
.
width
,
child:
img
,
child:
img
,
),
),
Container
(
margin:
const
EdgeInsets
.
only
(
top:
10.0
,
left:
14
),
height:
SizeConfig
.
getHeight
(
110
),
width:
SizeConfig
.
getWidth
(
320
),
decoration:
BoxDecoration
(
color:
Colors
.
transparent
,
//remove color to make it transpatent
border:
Border
.
all
(
style:
BorderStyle
.
solid
,
width:
2
,
color:
Colors
.
white
)),
),
Container
(
Container
(
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
...
@@ -388,10 +588,22 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
...
@@ -388,10 +588,22 @@ class _HomePageState extends State<HomePage> with TickerProviderStateMixin {
const
Radius
.
circular
(
30.0
),
const
Radius
.
circular
(
30.0
),
),
),
),
),
suffixIcon:
IconButton
(
onPressed:
()
{
presenter
.
searchCtrl
.
clear
();
},
icon:
Icon
(
Icons
.
clear
,
color:
presenter
.
searchCtrl
==
null
?
Colors
.
transparent
:
Colors
.
black
)),
prefixIcon:
IconButton
(
prefixIcon:
IconButton
(
onPressed:
()
{
onPressed:
()
{
presenter
.
getSearch
();
setState
(()
{
search
=
true
;
print
(
search
);
});
presenter
.
getSearch
();
},
},
icon:
Icon
(
Icons
.
search
,
color:
Colors
.
grey
)),
icon:
Icon
(
Icons
.
search
,
color:
Colors
.
grey
)),
filled:
true
,
filled:
true
,
hintText:
'ค้นหาแบบละเอียด'
,
hintText:
'ค้นหาแบบละเอียด'
,
...
...
lib/ui/home/home_presenter.dart
View file @
6bb31c96
...
@@ -21,7 +21,7 @@ class HomePresenter extends BasePresenter<HomePage> {
...
@@ -21,7 +21,7 @@ class HomePresenter extends BasePresenter<HomePage> {
GetprofileModel
getmodel
;
GetprofileModel
getmodel
;
LoginModel
logmodel
;
LoginModel
logmodel
;
c
ategoryModel
CatModel
;
C
ategoryModel
CatModel
;
TextEditingController
searchCtrl
=
TextEditingController
();
TextEditingController
searchCtrl
=
TextEditingController
();
SearchhomeModel
searchhomeModel
;
SearchhomeModel
searchhomeModel
;
...
@@ -29,19 +29,21 @@ class HomePresenter extends BasePresenter<HomePage> {
...
@@ -29,19 +29,21 @@ class HomePresenter extends BasePresenter<HomePage> {
HomePresenter
(
State
<
HomePage
>
state
)
:
super
(
state
);
HomePresenter
(
State
<
HomePage
>
state
)
:
super
(
state
);
Listitem
()
async
{
Listitem
()
async
{
_api
=
Api
<
categoryModel
>();
_api
=
Api
<
CategoryModel
>();
var
res
=
await
_api
.
category
({
var
res
=
await
_api
.
category
({
"access_type"
:
"
portal
"
,
"access_type"
:
"
mobile
"
,
});
});
print
(
"dddddddddddddddd"
);
if
(
res
.
fail
==
null
){
// LoadingView(state.context).hide();
if
(
res
.
success
!=
null
){
setState
(()
{
setState
(()
{
CatModel
=
res
.
success
;
CatModel
=
res
.
success
;
print
(
'
${CatModel.dATA[0].name}
'
);
});
});
}
else
{
}
else
{
...
@@ -50,21 +52,24 @@ class HomePresenter extends BasePresenter<HomePage> {
...
@@ -50,21 +52,24 @@ class HomePresenter extends BasePresenter<HomePage> {
}
}
getSearch
()
async
{
getSearch
()
async
{
LoadingView
(
state
.
context
).
show
();
_api
=
Api
<
SearchhomeModel
>();
_api
=
Api
<
SearchhomeModel
>();
var
res
=
await
_api
.
homesearch
({
var
res
=
await
_api
.
homesearch
({
"keyword_shop"
:
searchCtrl
.
text
,
"keyword_shop"
:
searchCtrl
.
text
,
"lang"
:
"all"
,
"lang"
:
"all"
,
"access"
:
"portal"
,
"access"
:
"portal"
,
});
});
print
(
'
$searchCtrl
'
);
LoadingView
(
state
.
context
).
hide
();
print
(
'
$searchCtrl
'
);
if
(
res
.
fail
==
null
)
if
(
res
.
success
.
status
)
{
if
(
res
.
fail
==
null
)
setState
(()
{
setState
(()
{
searchhomeModel
=
res
.
success
;
searchhomeModel
=
res
.
success
;
category_model
=
res
.
success
;
category_model
=
res
.
success
;
});
});
}
else
{
else
{
}
}
...
@@ -87,7 +92,7 @@ print('$searchCtrl');
...
@@ -87,7 +92,7 @@ print('$searchCtrl');
setState
(()
{
setState
(()
{
getmodel
=
res
.
success
;
getmodel
=
res
.
success
;
});
});
print
(
"Hii"
+
getmodel
.
result
[
0
].
name
);
//
print("Hii" + getmodel.result[0].name);
}
else
{
}
else
{
Alert
(
Alert
(
style:
AlertStyle
(
style:
AlertStyle
(
...
...
lib/ui/review_shop/review_shop_page.dart
View file @
6bb31c96
...
@@ -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,70 +303,89 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
...
@@ -295,70 +303,89 @@ class _ReviewShopPageState extends State<ReviewShopPage> {
),
),
],
],
),
),
),
Container
(
Container
(
// color: Colors.blue,
color:
Colors
.
blue
,
child:
Column
(
child:
Column
(
children:
<
Widget
>[
children:
<
Widget
>[
Padding
(
Padding
(
padding:
const
EdgeInsets
.
only
(
padding:
const
EdgeInsets
.
only
(
top:
10
,
bottom:
10
,
left:
2
,
right:
2
),
top:
10
,
bottom:
10
,
left:
2
,
right:
2
),
child:
Text
(
child:
Text
(
'การบริการและบรรยากาศดีมาก มีห้องอาบน้ำพร้อมผ้าเช็ดตัว สบู่ ครีมสระผม พนักงานดูแลเอาใจใส่ และคอยแนะนำตลอดจนถึง therapist มีความเป็นมืออาชีพให้ความผ่อนคลายแก่ลูกค้า'
,
'การบริการและบรรยากาศดีมาก มีห้องอาบน้ำพร้อมผ้าเช็ดตัว สบู่ ครีมสระผม พนักงานดูแลเอาใจใส่ และคอยแนะนำตลอดจนถึง therapist มีความเป็นมืออาชีพให้ความผ่อนคลายแก่ลูกค้า'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontSize:
SizeConfig
.
getFontSize
(
12
),
),
),
),
Row
(
children:
<
Widget
>[
RaisedButton
(
color:
Color
(
0xFF3694A3
),
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
20
),
),
onPressed:
()
{},
child:
Text
(
"บริการดีมาก"
,
style:
TextStyle
(
color:
Colors
.
white
,
),
),
),
),
),
SizedBox
(
),
width:
SizeConfig
.
getWidth
(
14
),
Row
(
),
children:
<
Widget
>[
RaisedButton
(
RaisedButton
(
color:
Color
(
0xFF3694A3
),
color:
Color
(
0xFF3694A3
),
shape:
RoundedRectangleBorder
(
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
20
),
borderRadius:
BorderRadius
.
circular
(
20
),
),
onPressed:
()
{},
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
right:
10
,
left:
10
,
),
),
onPressed:
()
{},
child:
Text
(
child:
Text
(
"
คุ้มค่าดี
"
,
"
บริการดีมาก
"
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
white
,
color:
Colors
.
white
,
),
),
),
),
),
),
),
SizedBox
(
],
width:
SizeConfig
.
getWidth
(
14
),
),
),
SizedBox
(
RaisedButton
(
height:
SizeConfig
.
getHeight
(
10
),
color:
Color
(
0xFF3694A3
),
),
shape:
RoundedRectangleBorder
(
],
borderRadius:
BorderRadius
.
circular
(
20
),
),
onPressed:
()
{},
child:
Padding
(
padding:
const
EdgeInsets
.
only
(
right:
10
,
left:
10
,
),
child:
Text
(
"คุ้มค่าดี"
,
style:
TextStyle
(
color:
Colors
.
white
,
),
),
),
),
],
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
10
),
),
],
),
),
),
],
)),
);
}
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
(),
],
),
),
);
);
}
}
}
}
lib/ui/shop/shop_Nearby_places.dart
View file @
6bb31c96
...
@@ -12,7 +12,8 @@ class ShopNearbyPlacesPage extends StatefulWidget {
...
@@ -12,7 +12,8 @@ class ShopNearbyPlacesPage extends StatefulWidget {
_ShopNearbyPlacesPageState
createState
()
=>
_ShopNearbyPlacesPageState
();
_ShopNearbyPlacesPageState
createState
()
=>
_ShopNearbyPlacesPageState
();
}
}
final
List
<
String
>
entries
=
<
String
>[
'A'
,
'B'
,
'C'
];
final
List
<
String
>
detail
=
<
String
>[
'SPA Cenvaree @ centara Grand Centralworld'
,
'SPA Cenvaree @ centara Grand Centralworld'
,
'SPA Cenvaree @ centara Grand Centralworld'
];
final
List
<
String
>
place
=
<
String
>[
'พญาไทย'
,
'บางเขน'
,
'เกษตร'
];
class
_ShopNearbyPlacesPageState
extends
State
<
ShopNearbyPlacesPage
>
with
TickerProviderStateMixin
{
class
_ShopNearbyPlacesPageState
extends
State
<
ShopNearbyPlacesPage
>
with
TickerProviderStateMixin
{
ShopNearByPlacePresenter
presenter
;
ShopNearByPlacePresenter
presenter
;
...
@@ -162,6 +163,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
...
@@ -162,6 +163,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
print
(
"selected"
);
print
(
"selected"
);
},
},
),
),
],
],
),
),
),
),
...
@@ -182,7 +184,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
...
@@ -182,7 +184,7 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
)))
)))
:
Container
(
:
Container
(
padding:
EdgeInsets
.
only
(
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
14
0
),
top:
SizeConfig
.
getPadding
(
8
0
),
left:
SizeConfig
.
getPadding
(
16
),
left:
SizeConfig
.
getPadding
(
16
),
right:
SizeConfig
.
getPadding
(
16
),
right:
SizeConfig
.
getPadding
(
16
),
bottom:
SizeConfig
.
getPadding
(
10
),
bottom:
SizeConfig
.
getPadding
(
10
),
...
@@ -199,135 +201,145 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
...
@@ -199,135 +201,145 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage>with TickerP
presenter
.
getmodel
.
results
.
data
[
i
].
updatedAt
,
presenter
.
getmodel
.
results
.
data
[
i
].
updatedAt
,
presenter
.
getmodel
.
results
.
data
[
i
].
distanceWithLocation
presenter
.
getmodel
.
results
.
data
[
i
].
distanceWithLocation
.
toString
());
.
toString
());
}
,
}
),
),
);
);
}
}
Widget
_nearByItem
(
String
title
,
String
detail
,
String
img
,
String
address
,
Widget
_nearByItem
(
String
title
,
String
detail
,
String
img
,
String
address
,
String
latlng
,
String
date_time
,
String
distanceWithLocation
)
{
String
latlng
,
String
date_time
,
String
distanceWithLocation
)
{
return
InkWell
(
onTap:
()
{
return
Card
(
Navigator
.
push
(
margin:
EdgeInsets
.
only
(
context
,
right:
SizeConfig
.
getPadding
(
0
),
CupertinoPageRoute
(
left:
SizeConfig
.
getPadding
(
0
),
builder:
(
context
)
=>
NearmeDetail
(
top:
SizeConfig
.
getPadding
(
10
),
store_name:
title
,
bottom:
SizeConfig
.
getPadding
(
10
)),
img_url:
'https://backend.feelver.com/storage/'
+
img
,
child:
Container
(
detail:
Util
.
removeHTMLTag
(
'
${detail}
'
),
// color: Colors.red,
address:
address
,
margin:
EdgeInsets
.
only
(
right:
15
,
left:
15
,
bottom:
20
,
top:
20
),
latlng:
latlng
,
// color: Colors.blueGrey,
date_time:
date_time
,
child:
Column
(
distanceWithLocation:
distanceWithLocation
+
' Km. '
,
children:
<
Widget
>[
),
Row
(
),
);
},
child:
Card
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
SizedBox
(
width:
SizeConfig
.
getWidth
(
16
),
),
Expanded
(
child:
Image
.
network
(
'https://backend.feelver.com/storage/'
+
img
,
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getHeight
(
160
),
fit:
BoxFit
.
fitHeight
,
),
),
Expanded
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Expanded
(
child:
Text
(
flex:
3
,
title
,
child:
Container
(
style:
TextStyle
(
// color: Colors.blue,
color:
Colors
.
black87
,
height:
SizeConfig
.
getHeight
(
250
),
fontSize:
SizeConfig
.
getFontSize
(
16
),
child:
presenter
.
getmodel
==
null
fontFamily:
"SF_Pro_Text"
,
?
Image
.
asset
(
fontWeight:
FontWeight
.
w700
),
"assets/images/demo_img.png"
,
),
fit:
BoxFit
.
cover
,
padding:
EdgeInsets
.
only
(
)
top:
SizeConfig
.
getPadding
(
30
),
:
Image
.
network
(
left:
SizeConfig
.
getPadding
(
16
),
'https://backend.feelver.com/storage/'
+
img
,
right:
SizeConfig
.
getPadding
(
16
),
fit:
BoxFit
.
cover
,
bottom:
SizeConfig
.
getPadding
(
0
)),
),),
),
// Container(
// child: Text(
// '',
// textAlign: TextAlign.left,
// style: TextStyle(
// color: Colors.black54,
// fontSize: SizeConfig.getFontSize(12),
// fontFamily: "SF_Pro_Text",
// fontWeight: FontWeight.w500),
// ),
//// alignment: Alignment.topLeft,
// padding: EdgeInsets.only(
// top: SizeConfig.getPadding(0),
// left: SizeConfig.getPadding(16),
// bottom: SizeConfig.getPadding(4)),
// ),
// SizedBox(
// height: 8,
// ),
Container
(
child:
Text
(
Util
.
removeHTMLTag
(
'
${detail}
'
),
textAlign:
TextAlign
.
left
,
maxLines:
3
,
style:
TextStyle
(
color:
Colors
.
black54
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
// alignment: Alignment.topLeft,
padding:
EdgeInsets
.
only
(
top:
SizeConfig
.
getPadding
(
8
),
left:
SizeConfig
.
getPadding
(
16
),
right:
SizeConfig
.
getPadding
(
8
),
bottom:
SizeConfig
.
getPadding
(
8
)),
),
),
Expanded
(
flex:
5
,
child:
Container
(
margin:
EdgeInsets
.
only
(
left:
15
),
// color: Colors.yellow,
height:
SizeConfig
.
getHeight
(
260
),
child:
Column
(
children:
<
Widget
>[
Container
(
padding:
EdgeInsets
.
all
(
10
),
alignment:
Alignment
.
topLeft
,
// color: Colors.red,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
<
Widget
>[
Text
(
title
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
18
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
SizedBox
(
height:
5
,
),
Text
(
"SPA Cenvaree @ Centara Grand CentralWorld Bangkok"
,
style:
TextStyle
(
color:
Color
(
0xff969696
),
fontSize:
SizeConfig
.
getFontSize
(
11
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
],
),
),
Container
(
padding:
EdgeInsets
.
only
(
left:
10
,
right:
10
),
alignment:
Alignment
.
topLeft
,
child:
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
<
Widget
>[
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Image
.
asset
(
'assets/images/pin_drop.png'
,
height:
20
,
width:
20
,
),
SizedBox
(
width:
5
,
),
Text
(
"พญาไท กรุงเทพฯ"
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
13
),
fontFamily:
"SF_Pro_Text"
,
),
),
],
),
SizedBox
(
height:
10
,
),
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
Icon
(
Icons
.
access_time
,
color:
Color
(
0xffEEAFB7
),
),
SizedBox
(
width:
5
,
),
],
),
SizedBox
(
height:
10
,
),
SizedBox
(
height:
SizeConfig
.
getHeight
(
5
),
),
Row
(
children:
<
Widget
>[
SizedBox
(
width:
SizeConfig
.
getWidth
(
16
),
),
ImageIcon
(
AssetImage
(
'assets/images/pin_drop.png'
),
color:
Colors
.
black54
,
size:
SizeConfig
.
getFontSize
(
16
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
4
),
),
Text
(
distanceWithLocation
+
' Km.'
,
style:
TextStyle
(
fontWeight:
FontWeight
.
w500
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
color:
Colors
.
black54
,
),
),
],
),
SizedBox
(
],
height:
SizeConfig
.
getWidth
(
10
),
),
),
],
),
),
),
),
],
],
),
),
)
,
]
,
]
,
)
,
),
),
)
,
)
;
);
}
}
}
}
lib/ui/shop/shop_list.dart
View file @
6bb31c96
...
@@ -345,6 +345,24 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
...
@@ -345,6 +345,24 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),
),
),
),
Positioned
(
left:
SizeConfig
.
getPadding
(
280
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Icon
(
Icons
.
star
,
color:
Colors
.
orangeAccent
,
size:
SizeConfig
.
getFontSize
(
18
),),
),
Positioned
(
left:
SizeConfig
.
getPadding
(
300
),
top:
SizeConfig
.
getPadding
(
190
),
child:
Text
(
"4.9"
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
),
],
],
),
),
),
),
...
@@ -390,104 +408,8 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
...
@@ -390,104 +408,8 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
fontWeight:
FontWeight
.
w700
),
fontWeight:
FontWeight
.
w700
),
),
),
),
),
Row
(
children:
<
Widget
>[
SizedBox
(
width:
SizeConfig
.
getWidth
(
20
),
),
Image
.
asset
(
'assets/images/clock.png'
,
width:
SizeConfig
.
getWidth
(
20
),
height:
SizeConfig
.
getWidth
(
20
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
10
),
),
Text
(
'90 นาที'
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Colors
.
black87
,
fontSize:
SizeConfig
.
getFontSize
(
12
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
30
),
),
Image
.
asset
(
'assets/images/sell.png'
,
width:
SizeConfig
.
getWidth
(
20
),
height:
SizeConfig
.
getWidth
(
20
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
5
),
),
Text
(
'฿1,599.00 '
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
238
,
175
,
183
,
1
),
fontSize:
SizeConfig
.
getFontSize
(
12
),
decoration:
TextDecoration
.
lineThrough
,
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w500
),
),
SizedBox
(
width:
SizeConfig
.
getWidth
(
5
),
),
Text
(
'฿1,599.00 '
,
textAlign:
TextAlign
.
left
,
style:
TextStyle
(
color:
Color
.
fromRGBO
(
253
,
41
,
86
,
1
),
fontSize:
SizeConfig
.
getFontSize
(
22
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
],
),
InkWell
(
onTap:
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
context
)
=>
ShopListDetail
(),
),
);
},
child:
Stack
(
children:
<
Widget
>[
Container
(
child:
Image
.
asset
(
'assets/images/btn_shoplist.png'
),
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
20
),
right:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
20
),
bottom:
SizeConfig
.
getPadding
(
20
),
),
),
Container
(
alignment:
Alignment
.
center
,
child:
Text
(
'หยิบใส่รถเข็น'
,
textAlign:
TextAlign
.
center
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
SizeConfig
.
getFontSize
(
14
),
fontFamily:
"SF_Pro_Text"
,
fontWeight:
FontWeight
.
w700
),
),
padding:
EdgeInsets
.
only
(
left:
SizeConfig
.
getPadding
(
60
),
right:
SizeConfig
.
getPadding
(
20
),
top:
SizeConfig
.
getPadding
(
30
),
bottom:
SizeConfig
.
getPadding
(
20
),
),
)
],
),
)
],
],
),
),
);
);
...
...
lib/ui/shop/shop_main.dart
View file @
6bb31c96
...
@@ -273,6 +273,7 @@ class _MainShopState extends State<MainShop>
...
@@ -273,6 +273,7 @@ class _MainShopState extends State<MainShop>
},
},
),
),
],
],
),
),
),
),
Expanded
(
Expanded
(
...
...
lib/ui/shop/shop_service.dart
View file @
6bb31c96
...
@@ -3,6 +3,8 @@ import 'package:feelverapp/util/SizeConfig.dart';
...
@@ -3,6 +3,8 @@ import 'package:feelverapp/util/SizeConfig.dart';
import
'package:feelverapp/util/rating_star.dart'
;
import
'package:feelverapp/util/rating_star.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter/material.dart'
;
import
'../../service/api.dart'
;
class
ShopServicePage
extends
StatefulWidget
{
class
ShopServicePage
extends
StatefulWidget
{
@override
@override
_ShopServicePageState
createState
()
=>
_ShopServicePageState
();
_ShopServicePageState
createState
()
=>
_ShopServicePageState
();
...
@@ -76,7 +78,7 @@ class _ShopServicePageState extends State<ShopServicePage>
...
@@ -76,7 +78,7 @@ class _ShopServicePageState extends State<ShopServicePage>
:
Image
.
network
(
:
Image
.
network
(
'https://backend.feelver.com/storage/'
+
image
,
'https://backend.feelver.com/storage/'
+
image
,
fit:
BoxFit
.
cover
,
fit:
BoxFit
.
cover
,
)),
)
,
),
),
),
Expanded
(
Expanded
(
flex:
5
,
flex:
5
,
...
...
pubspec.lock
View file @
6bb31c96
# Generated by pub
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
packages:
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.13"
args:
dependency: transitive
description:
name: args
url: "https://pub.dartlang.org"
source: hosted
version: "1.6.0"
async:
async:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -78,6 +64,13 @@ packages:
...
@@ -78,6 +64,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.0.8"
version: "1.0.8"
fake_async:
dependency: transitive
description:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
file:
file:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -142,13 +135,6 @@ packages:
...
@@ -142,13 +135,6 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "3.1.4"
version: "3.1.4"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.12"
image_cropper:
image_cropper:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -225,7 +211,7 @@ packages:
...
@@ -225,7 +211,7 @@ packages:
name: path_provider_platform_interface
name: path_provider_platform_interface
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.0.
2
"
version: "1.0.
3
"
pedantic:
pedantic:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -233,13 +219,6 @@ packages:
...
@@ -233,13 +219,6 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.9.0"
version: "1.9.0"
petitparser:
dependency: transitive
description:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "2.4.0"
platform:
platform:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -275,13 +254,6 @@ packages:
...
@@ -275,13 +254,6 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "1.4.4"
version: "1.4.4"
quiver:
dependency: transitive
description:
name: quiver
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.3"
rflutter_alert:
rflutter_alert:
dependency: "direct main"
dependency: "direct main"
description:
description:
...
@@ -412,7 +384,7 @@ packages:
...
@@ -412,7 +384,7 @@ packages:
name: url_launcher_web
name: url_launcher_web
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.1.2"
version: "0.1.2
+1
"
vector_math:
vector_math:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -427,13 +399,6 @@ packages:
...
@@ -427,13 +399,6 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "0.1.0"
version: "0.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.1"
sdks:
sdks:
dart: ">=2.9.0-14.0.dev <3.0.0"
dart: ">=2.9.0-14.0.dev <3.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
flutter: ">=1.12.13+hotfix.5 <2.0.0"
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