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
633285b5
Commit
633285b5
authored
Aug 26, 2020
by
Mobile : Jetrin Phuekkaew (N'new)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update loading favourite
parent
6b35189b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
191 additions
and
164 deletions
+191
-164
lib/ui/favorite/favorite.dart
+15
-1
lib/ui/favorite/favorite_presenter.dart
+6
-3
lib/ui/menu/menu.dart
+161
-160
lib/ui/shop/shop_list_detail.dart
+1
-0
pubspec.lock
+7
-0
pubspec.yaml
+1
-0
No files found.
lib/ui/favorite/favorite.dart
View file @
633285b5
...
@@ -61,7 +61,21 @@ class _FavoriteState extends State<Favorite> {
...
@@ -61,7 +61,21 @@ class _FavoriteState extends State<Favorite> {
),
),
child:
Container
(
child:
Container
(
child:
presenter
.
favoriteModel
==
null
child:
presenter
.
favoriteModel
==
null
?
Container
()
?
Container
(
child:
Center
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
<
Widget
>[
SizedBox
(
child:
CircularProgressIndicator
(
valueColor:
new
AlwaysStoppedAnimation
<
Color
>(
Color
.
fromRGBO
(
69
,
85
,
79
,
1
),
),),
height:
30.0
,
width:
30.0
,
),]
))
)
:
ListView
.
builder
(
:
ListView
.
builder
(
itemCount:
presenter
.
favoriteModel
.
wishListItem
.
length
,
itemCount:
presenter
.
favoriteModel
.
wishListItem
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
...
...
lib/ui/favorite/favorite_presenter.dart
View file @
633285b5
import
'package:feelverapp/model/favorite/delete_favorite_Model.dart'
;
import
'package:feelverapp/model/favorite/delete_favorite_Model.dart'
;
import
'package:feelverapp/model/favorite/favorite_Model.dart'
;
import
'package:feelverapp/model/favorite/favorite_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/favorite/favorite.dart'
;
import
'package:feelverapp/ui/favorite/favorite.dart'
;
...
@@ -15,11 +16,11 @@ class FavoritePresenter extends BasePresenter<Favorite> {
...
@@ -15,11 +16,11 @@ class FavoritePresenter extends BasePresenter<Favorite> {
FavoritePresenter
(
State
<
Favorite
>
state
)
:
super
(
state
);
FavoritePresenter
(
State
<
Favorite
>
state
)
:
super
(
state
);
Favoriteitem
()
async
{
Favoriteitem
()
async
{
var
_id
=
await
AccountUtil
.
getID
();
var
_id
=
await
AccountUtil
.
getID
();
print
(
_id
);
print
(
"555555555555"
);
_api
=
Api
<
FavoriteModel
>();
_api
=
Api
<
FavoriteModel
>();
var
res
=
await
_api
.
favorite
({
var
res
=
await
_api
.
favorite
({
"customer_id"
:
_id
,
"customer_id"
:
_id
,
});
});
...
@@ -34,11 +35,13 @@ class FavoritePresenter extends BasePresenter<Favorite> {
...
@@ -34,11 +35,13 @@ class FavoritePresenter extends BasePresenter<Favorite> {
}
}
Deletefavoriteitem
(
String
id
)
async
{
Deletefavoriteitem
(
String
id
)
async
{
LoadingView
(
state
.
context
).
show
();
_api
=
Api
<
DeletefavoriteModel
>();
_api
=
Api
<
DeletefavoriteModel
>();
var
res
=
await
_api
.
deletefavorite
({
var
res
=
await
_api
.
deletefavorite
({
"id"
:
id
,
"id"
:
id
,
});
});
LoadingView
(
state
.
context
).
hide
();
if
(
res
.
fail
==
null
)
{
if
(
res
.
fail
==
null
)
{
setState
(()
{
setState
(()
{
deletefavoriteModel
=
res
.
success
;
deletefavoriteModel
=
res
.
success
;
...
...
lib/ui/menu/menu.dart
View file @
633285b5
...
@@ -155,7 +155,7 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
...
@@ -155,7 +155,7 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
left:
SizeConfig
.
getPadding
(
30
)),
left:
SizeConfig
.
getPadding
(
30
)),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
Text
(
child:
Text
(
'My order
Status
'
,
'My order '
,
style:
TextStyle
(
style:
TextStyle
(
color:
Colors
.
black
,
color:
Colors
.
black
,
fontSize:
SizeConfig
.
getFontSize
(
16
),
fontSize:
SizeConfig
.
getFontSize
(
16
),
...
@@ -164,165 +164,166 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
...
@@ -164,165 +164,166 @@ class _NavDrawerState extends State<NavDrawer> with TickerProviderStateMixin {
),
),
),
),
),
),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'รายการสั่งซื้อที่สำเร็จ'
,
// 'รายการสั่งซื้อที่สำเร็จ',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'จองแล้ว'
,
// 'จองแล้ว',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'ยังไม่ได้จอง'
,
// 'ยังไม่ได้จอง',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
GestureDetector
(
// GestureDetector(
onTap:
()
{},
// onTap: () {},
child:
Container
(
// child: Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
12
),
// top: SizeConfig.getPadding(12),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'รายการสั่งซื้อไม่สำเร็จ'
,
// 'รายการสั่งซื้อไม่สำเร็จ',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
SizeConfig
.
getPadding
(
30
),
// top: SizeConfig.getPadding(30),
left:
SizeConfig
.
getPadding
(
30
)),
// left: SizeConfig.getPadding(30)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'language'
,
// 'language',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
Row
(
// Row(
children:
<
Widget
>[
// children: <Widget>[
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
left:
SizeConfig
.
getPadding
(
30
),
// left: SizeConfig.getPadding(30),
top:
SizeConfig
.
getPadding
(
16
)),
// top: SizeConfig.getPadding(16)),
child:
Image
.
asset
(
// child: Image.asset(
'assets/images/ic_th.png'
,
// 'assets/images/ic_th.png',
width:
SizeConfig
.
getWidth
(
50
),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getWidth
(
50
),
// height: SizeConfig.getWidth(50),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
left:
SizeConfig
.
getPadding
(
30
),
// left: SizeConfig.getPadding(30),
top:
SizeConfig
.
getPadding
(
16
)),
// top: SizeConfig.getPadding(16)),
child:
Image
.
asset
(
// child: Image.asset(
'assets/images/ic_en.png'
,
// 'assets/images/ic_en.png',
width:
SizeConfig
.
getWidth
(
50
),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getWidth
(
50
),
// height: SizeConfig.getWidth(50),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
left:
SizeConfig
.
getPadding
(
30
),
// left: SizeConfig.getPadding(30),
top:
SizeConfig
.
getPadding
(
16
)),
// top: SizeConfig.getPadding(16)),
child:
Image
.
asset
(
// child: Image.asset(
'assets/images/ic_ch.png'
,
// 'assets/images/ic_ch.png',
width:
SizeConfig
.
getWidth
(
50
),
// width: SizeConfig.getWidth(50),
height:
SizeConfig
.
getWidth
(
50
),
// height: SizeConfig.getWidth(50),
),
// ),
),
// ),
],
// ],
),
// ),
Row
(
// Row(
children:
<
Widget
>[
// children: <Widget>[
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
0
,
left:
SizeConfig
.
getPadding
(
42
)),
// top: 0, left: SizeConfig.getPadding(42)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'TH'
,
// 'TH',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
0
,
left:
SizeConfig
.
getPadding
(
60
)),
// top: 0, left: SizeConfig.getPadding(60)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'EN'
,
// 'EN',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
Container
(
// Container(
padding:
EdgeInsets
.
only
(
// padding: EdgeInsets.only(
top:
0
,
left:
SizeConfig
.
getPadding
(
60
)),
// top: 0, left: SizeConfig.getPadding(60)),
alignment:
Alignment
.
topLeft
,
// alignment: Alignment.topLeft,
child:
Text
(
// child: Text(
'CH'
,
// 'CH',
style:
TextStyle
(
// style: TextStyle(
color:
Colors
.
black
,
// color: Colors.black,
fontSize:
SizeConfig
.
getFontSize
(
16
),
// fontSize: SizeConfig.getFontSize(16),
fontFamily:
"SF_Pro_Text"
,
// fontFamily: "SF_Pro_Text",
fontWeight:
FontWeight
.
w600
),
// fontWeight: FontWeight.w600),
),
// ),
),
// ),
],
// ],
),
// ),
SizedBox
(
height:
50
),
Row
(
Row
(
children:
<
Widget
>[
children:
<
Widget
>[
Container
(
Container
(
...
...
lib/ui/shop/shop_list_detail.dart
View file @
633285b5
...
@@ -571,6 +571,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
...
@@ -571,6 +571,7 @@ class _ShopListDetailState extends State<ShopListDetail> {
),
),
alignment:
Alignment
.
topLeft
,
alignment:
Alignment
.
topLeft
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
physics:
const
NeverScrollableScrollPhysics
(),
itemCount:
presenter
.
model
.
result
[
0
].
openHour
.
length
,
itemCount:
presenter
.
model
.
result
[
0
].
openHour
.
length
,
itemBuilder:
(
context
,
i
)
{
itemBuilder:
(
context
,
i
)
{
return
Text
(
return
Text
(
...
...
pubspec.lock
View file @
633285b5
...
@@ -92,6 +92,13 @@ packages:
...
@@ -92,6 +92,13 @@ packages:
url: "https://pub.dartlang.org"
url: "https://pub.dartlang.org"
source: hosted
source: hosted
version: "5.2.1"
version: "5.2.1"
firebase_crashlytics:
dependency: "direct main"
description:
name: firebase_crashlytics
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.4+1"
flutter:
flutter:
dependency: "direct main"
dependency: "direct main"
description: flutter
description: flutter
...
...
pubspec.yaml
View file @
633285b5
...
@@ -37,6 +37,7 @@ dependencies:
...
@@ -37,6 +37,7 @@ dependencies:
date_format
:
^1.0.8
date_format
:
^1.0.8
flutter_datetime_picker
:
^1.4.0
flutter_datetime_picker
:
^1.4.0
carousel_slider
:
^2.2.1
carousel_slider
:
^2.2.1
firebase_crashlytics
:
^0.1.4+1
...
...
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