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
17b588a0
Commit
17b588a0
authored
Aug 20, 2020
by
Mobile : Jetrin Phuekkaew (N'new)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update home and search
parent
ac07dd74
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
69 additions
and
140 deletions
+69
-140
ios/Flutter/.last_build_id
+2
-2
ios/Podfile.lock
+1
-1
lib/main.dart
+1
-1
lib/model/category/category_model.dart
+17
-17
lib/service/api.dart
+9
-8
lib/ui/booking/booking_detail.dart
+3
-4
lib/ui/home/home.dart
+0
-0
lib/ui/home/home_presenter.dart
+12
-8
lib/ui/shop/shop_Nearby_places.dart
+2
-0
lib/ui/shop/shop_list.dart
+20
-98
lib/ui/shop/shop_main.dart
+2
-1
No files found.
ios/Flutter/.last_build_id
View file @
17b588a0
65bf9efbfad64e1b5e4b50eeaed8247f
\ No newline at end of file
be0f81c896162f43cdffd3c7f9c50177
\ No newline at end of file
ios/Podfile.lock
View file @
17b588a0
...
...
@@ -44,4 +44,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c
COCOAPODS: 1.
10.0.beta
.1
COCOAPODS: 1.
9
.1
lib/main.dart
View file @
17b588a0
...
...
@@ -33,7 +33,7 @@ class MyApp extends StatelessWidget {
home:
MainShop
()
home:
SplashScreenPage
()
//home: EditProfile(),
...
...
lib/model/category/category_model.dart
View file @
17b588a0
class
c
ategoryModel
{
List
<
DATA
>
dATA
;
class
C
ategoryModel
{
List
<
Result
>
result
;
categoryModel
({
this
.
dATA
});
CategoryModel
({
this
.
result
});
c
ategoryModel
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'
DATA
'
]
!=
null
)
{
dATA
=
new
List
<
DATA
>();
json
[
'
DATA
'
].
forEach
((
v
)
{
dATA
.
add
(
new
DATA
.
fromJson
(
v
));
C
ategoryModel
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
if
(
json
[
'
result
'
]
!=
null
)
{
result
=
new
List
<
Result
>();
json
[
'
result
'
].
forEach
((
v
)
{
result
.
add
(
new
Result
.
fromJson
(
v
));
});
}
}
Map
<
String
,
dynamic
>
toJson
()
{
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
;
}
}
class
DATA
{
class
Result
{
int
id
;
int
parentId
;
String
name
;
...
...
@@ -29,16 +29,16 @@ class DATA {
String
displayName
;
String
cover
;
String
detail
;
dynamic
type
;
Null
type
;
String
status
;
int
sortOrder
;
dynamic
storeId
;
dynamic
vendorId
;
dynamic
createdAt
;
Null
storeId
;
Null
vendorId
;
Null
createdAt
;
String
updatedAt
;
String
visibility
;
DATA
(
Result
(
{
this
.
id
,
this
.
parentId
,
this
.
name
,
...
...
@@ -55,7 +55,7 @@ class DATA {
this
.
updatedAt
,
this
.
visibility
});
DATA
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
Result
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
id
=
json
[
'id'
];
parentId
=
json
[
'parent_id'
];
name
=
json
[
'name'
];
...
...
lib/service/api.dart
View file @
17b588a0
...
...
@@ -220,21 +220,18 @@ class Api<T> {
return
result
;
}
Future
<
Response
<
T
>>
category
(
Object
body
)
async
{
var
_model
;
var
_fail
;
var
result
;
print
(
"Result test "
);
// (body as Map)['lang'] = allTranslations.currentLanguage;
await
_httpConnection
(
"
${this._baseApi}
/category"
,
this
.
_headerApi
,
body
)
.
then
((
response
)
{
print
(
"ผลลัพ
ท์ เท่ากับ "
"
${response.body}
"
);
print
(
"ผลลัพ
เท่ากับบบบ "
+
"
${response.body}
"
);
if
(
response
.
statusCode
==
200
)
{
// Array to Map Json
Map
<
String
,
dynamic
>
myData
=
arrayToJson
(
response
.
body
);
_model
=
categoryModel
.
fromJson
(
myData
);
print
(
'myModel '
+
_model
);
_model
=
CategoryModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
else
{
_fail
=
FailModel
.
fromJson
(
json
.
decode
(
response
.
body
));
}
...
...
@@ -243,6 +240,10 @@ class Api<T> {
return
result
;
}
Future
<
Response
<
T
>>
shoplist
(
Object
body
)
async
{
var
_model
;
var
_fail
;
...
...
lib/ui/booking/booking_detail.dart
View file @
17b588a0
...
...
@@ -11,10 +11,9 @@ class BookingDetail extends StatefulWidget {
class
_BookingDetailState
extends
State
<
BookingDetail
>
{
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
body:
_setupView
(),
);
return
ListView
(
padding:
EdgeInsets
.
all
(
0
),
children:
<
Widget
>[
_setupView
(),
]);
}
_setupView
()
{
...
...
lib/ui/home/home.dart
View file @
17b588a0
This diff is collapsed.
Click to expand it.
lib/ui/home/home_presenter.dart
View file @
17b588a0
...
...
@@ -21,7 +21,7 @@ class HomePresenter extends BasePresenter<HomePage> {
GetprofileModel
getmodel
;
LoginModel
logmodel
;
c
ategoryModel
CatModel
;
C
ategoryModel
CatModel
;
TextEditingController
searchCtrl
=
TextEditingController
();
SearchhomeModel
searchhomeModel
;
...
...
@@ -29,19 +29,21 @@ class HomePresenter extends BasePresenter<HomePage> {
HomePresenter
(
State
<
HomePage
>
state
)
:
super
(
state
);
Listitem
()
async
{
_api
=
Api
<
categoryModel
>();
_api
=
Api
<
CategoryModel
>();
var
res
=
await
_api
.
category
({
"access_type"
:
"
portal
"
,
"access_type"
:
"
mobile
"
,
});
if
(
res
.
fail
=
=
null
){
// LoadingView(state.context).hide();
if
(
res
.
success
!
=
null
){
setState
(()
{
CatModel
=
res
.
success
;
print
(
"dddddddddddddddd"
);
print
(
'
${CatModel.dATA[0].name}
'
);
});
}
else
{
...
...
@@ -50,21 +52,23 @@ class HomePresenter extends BasePresenter<HomePage> {
}
getSearch
()
async
{
LoadingView
(
state
.
context
).
show
();
_api
=
Api
<
SearchhomeModel
>();
var
res
=
await
_api
.
homesearch
({
"keyword_shop"
:
searchCtrl
.
text
,
"lang"
:
"all"
,
"access"
:
"portal"
,
});
LoadingView
(
state
.
context
).
hide
();
print
(
'
$searchCtrl
'
);
if
(
res
.
fail
==
null
)
if
(
res
.
success
.
status
)
{
if
(
res
.
fail
==
null
)
setState
(()
{
searchhomeModel
=
res
.
success
;
category_model
=
res
.
success
;
});
}
else
{
}
...
...
lib/ui/shop/shop_Nearby_places.dart
View file @
17b588a0
...
...
@@ -117,6 +117,8 @@ class _ShopNearbyPlacesPageState extends State<ShopNearbyPlacesPage> {
),
);
},
child:
Card
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
...
...
lib/ui/shop/shop_list.dart
View file @
17b588a0
...
...
@@ -345,6 +345,24 @@ class _ShopListState extends State<ShopList> with TickerProviderStateMixin {
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 {
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 @
17b588a0
import
'package:feelverapp/ui/booking/booking_detail.dart'
;
import
'package:feelverapp/ui/shop/shop.dart'
;
import
'package:feelverapp/ui/shop/shop_Nearby_places.dart'
;
import
'package:feelverapp/ui/shop/shop_reviews.dart'
;
...
...
@@ -154,7 +155,7 @@ class _MainShopState extends State<MainShop> with SingleTickerProviderStateMixi
//service detail//////////////
child:
Shop
()
child:
BookingDetail
()
),
...
...
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