Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
B
Byodv2
Project
Project
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
Dio Maulana
Byodv2
Commits
300ca720
Commit
300ca720
authored
Oct 19, 2022
by
Jasa Digital
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
19/10/22
parent
bdbf0d11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
1279 additions
and
940 deletions
+1279
-940
api.dart
lib/api/api.dart
+43
-5
change_delivery_pickup.dart
lib/bloc/change_delivery_pickup.dart
+9
-0
helper.dart
lib/helper/helper.dart
+17
-0
mq.dart
lib/helper/mq.dart
+1
-1
main.dart
lib/main.dart
+2
-0
bill.dart
lib/models/bill.dart
+32
-26
bill_detail.dart
lib/models/bill_detail.dart
+3
-1
variant_detail_bill.dart
lib/models/variant_detail_bill.dart
+13
-0
cat_list.dart
lib/ui/home/cat_list.dart
+5
-2
new_home2.dart
lib/ui/home/new_home2.dart
+188
-109
bottom_sheet_pickup_delivery.dart
lib/ui/viewbill/bottom_sheet_pickup_delivery.dart
+194
-0
component_name_user.dart
lib/ui/viewbill/component_name_user.dart
+103
-0
delivery_pickup_state.dart
lib/ui/viewbill/delivery_pickup_state.dart
+378
-0
order_view_bill_new.dart
lib/ui/viewbill/order_view_bill_new.dart
+47
-3
timeline.dart
lib/ui/viewbill/timeline.dart
+0
-356
view_bill_new.dart
lib/ui/viewbill/view_bill_new.dart
+208
-432
app_bar_webview.dart
lib/ui/webview/app_bar_webview.dart
+20
-3
webview.dart
lib/ui/webview/webview.dart
+16
-2
No files found.
lib/api/api.dart
View file @
300ca720
...
...
@@ -26,6 +26,7 @@ import '../helper/widget/open_url.dart';
import
'../main.dart'
;
import
'../models/branchs.dart'
;
import
'../models/variant_categories.dart'
;
import
'../models/variant_detail_bill.dart'
;
import
'../models/variants.dart'
;
// ignore: avoid_web_libraries_in_flutter
...
...
@@ -867,9 +868,24 @@ class Api {
bill
.
customerName
==
orderDetail
[
d
][
'customer_name'
]);
if
(
index
!=
-
1
)
{
// ketemu nama yang sama
List
<
String
>
variants
=
[];
List
<
VariantDetailBill
>
variants
=
[];
for
(
int
z
=
0
;
z
<
orderDetail
[
d
][
'variant'
].
length
;
z
++)
{
variants
.
add
(
orderDetail
[
d
][
'variant'
][
z
]);
int
indexVariantBill
=
variants
.
indexWhere
((
element
)
=>
(
element
.
caption
==
orderDetail
[
d
][
'variant'
][
z
][
'caption'
]));
if
(
indexVariantBill
==
-
1
)
{
Map
<
String
,
dynamic
>
variantBill
=
{
"caption"
:
orderDetail
[
d
][
'variant'
][
z
][
'caption'
],
"variant_name"
:
[
orderDetail
[
d
][
'variant'
][
z
][
'variant_name'
].
toString
()
]
};
variants
.
add
(
VariantDetailBill
.
json
(
variantBill
));
}
else
{
variants
[
indexVariantBill
]
.
variantName
.
add
(
orderDetail
[
d
][
'variant'
][
z
][
'variant_name'
]);
}
}
int
totalPerCustomer
=
...
...
@@ -895,9 +911,24 @@ class Api {
}
else
{
// beda orang
List
<
BillDetail
>
billDetail
=
[];
List
<
String
>
variants
=
[];
List
<
VariantDetailBill
>
variants
=
[];
for
(
int
z
=
0
;
z
<
orderDetail
[
d
][
'variant'
].
length
;
z
++)
{
variants
.
add
(
orderDetail
[
d
][
'variant'
][
z
]);
int
indexVariantBill
=
variants
.
indexWhere
((
element
)
=>
(
element
.
caption
==
orderDetail
[
d
][
'variant'
][
z
][
'caption'
]));
if
(
indexVariantBill
==
-
1
)
{
Map
<
String
,
dynamic
>
variantBill
=
{
"caption"
:
orderDetail
[
d
][
'variant'
][
z
][
'caption'
],
"variant_name"
:
[
orderDetail
[
d
][
'variant'
][
z
][
'variant_name'
].
toString
()
]
};
variants
.
add
(
VariantDetailBill
.
json
(
variantBill
));
}
else
{
variants
[
indexVariantBill
]
.
variantName
.
add
(
orderDetail
[
d
][
'variant'
][
z
][
'variant_name'
]);
}
}
var
z
=
{
"id"
:
orderDetail
[
d
][
'id'
],
...
...
@@ -946,7 +977,14 @@ class Api {
"delivery_fee"
:
jsonObject
[
'data'
][
'delivery_fee'
]
??
"0.00"
,
"delivery_state"
:
jsonObject
[
'data'
][
'order_delivery_state'
]
??
0
,
"rdm_staff_courier_name"
:
jsonObject
[
'data'
][
'rdm_staff_courier_name'
]
??
""
,
"rdm_staff_courier_mobile"
:
jsonObject
[
'data'
][
'rdm_staff_courier_mobile'
]
??
""
,
};
if
(
jsonObject
[
'data'
][
'delivery_fee'
]
!=
""
)
{
setIsCustomerDelivery
(
true
);
}
bill
.
add
(
Bill
.
createBill
(
i
));
// billDetail.add(BillDetail.createBillDetail(orderDetail[d]));
}
...
...
@@ -2261,7 +2299,7 @@ class Api {
if
(
jsonObject
[
'status'
].
toString
().
toLowerCase
()
==
'ok'
)
{
return
true
;
}
else
{
EasyLoading
.
showToast
(
jsonObject
[
'msg'
]);
//
EasyLoading.showToast(jsonObject['msg']);
return
false
;
}
}
else
{
...
...
lib/bloc/change_delivery_pickup.dart
0 → 100644
View file @
300ca720
import
'package:flutter_bloc/flutter_bloc.dart'
;
class
ChangeDeliveryPickupBloc
extends
Cubit
<
bool
>
{
ChangeDeliveryPickupBloc
()
:
super
(
false
);
void
toDelivery
(
bool
status
)
{
emit
(
status
);
}
}
lib/helper/helper.dart
View file @
300ca720
...
...
@@ -7,6 +7,7 @@ import 'package:crypto/crypto.dart';
import
'package:flutter/material.dart'
;
import
'package:intl/intl.dart'
;
import
'package:http/http.dart'
as
http
;
import
'package:uuid/uuid.dart'
;
import
'../api/api.dart'
;
import
'../main.dart'
;
import
'logger.dart'
;
...
...
@@ -418,7 +419,16 @@ String logoUrl = prefs.getString("logoUrl") ?? "";
double
imageHeight
=
(
logoUrl
!=
''
)
?
96
:
0
;
double
heighScrollWithImage
=
371
+
imageHeight
;
double
heighDeliveryPickupDetail
=
187
;
double
heighScrollWithOutImage
=
371
;
double
animateToWhenCategoryClick
(
)
{
if
(
getIsDeliveryPickup
())
{
return
heighScrollWithImage
+
heighDeliveryPickupDetail
;
}
else
{
return
heighScrollWithImage
;
}
}
//** */
//** core warna */
...
...
@@ -719,6 +729,9 @@ const double phoneIconSize = 16;
const
String
trahsIcon
=
'
\
uf2ed'
;
const
double
trahsIconSize
=
16
;
const
String
angelDown
=
'
\
uf107'
;
const
double
angelDownSize
=
12
;
//** fontawesome unicode */
//** max item menu */
...
...
@@ -766,4 +779,8 @@ const int orderDeliveryStateInDelivery = 1;
const
int
orderDeliveryStateDelivered
=
99
;
// devliery state
// init uuid
const
uuidInit
=
Uuid
();
//
//** END CONSTANT */
lib/helper/mq.dart
View file @
300ca720
...
...
@@ -21,7 +21,7 @@ const String queueTopic = 'romi/byod/payment';
// String queueMessage = getMqMessage();
const
String
usernameMq
=
'jasadigital'
;
const
String
passwordMq
=
'jasadigital'
;
const
uuidInit
=
Uuid
();
var
uuid
=
uuidInit
.
v4
();
Future
<
int
>
runMqTT
(
BuildContext
context
)
async
{
...
...
lib/main.dart
View file @
300ca720
...
...
@@ -20,6 +20,7 @@ import 'package:web_browser_detect/web_browser_detect.dart';
import
'bloc/branch_exist.dart'
;
import
'bloc/branch_list.dart'
;
import
'bloc/change_delivery_pickup.dart'
;
import
'bloc/fav_selected_bar.dart'
;
import
'bloc/feedback_option.dart'
;
import
'bloc/feedback_select.dart'
;
...
...
@@ -195,6 +196,7 @@ class _MyAppState extends State<MyApp> {
BlocProvider
(
create:
(
_
)
=>
SearchBranch
()),
BlocProvider
(
create:
(
_
)
=>
AddressUser
()),
BlocProvider
(
create:
(
_
)
=>
ExpandDetailOutlet
()),
BlocProvider
(
create:
(
_
)
=>
ChangeDeliveryPickupBloc
()),
],
child:
MaterialApp
(
title:
(
widget
.
title
==
null
)
?
defaultTitle
:
widget
.
title
,
...
...
lib/models/bill.dart
View file @
300ca720
...
...
@@ -27,6 +27,8 @@ class Bill {
String
platformFee
;
String
deliveryFee
;
int
deliveryState
;
String
courierName
;
String
courierPhone
;
// List<MemberInfo> memberInfo;
Bill
({
...
...
@@ -54,36 +56,40 @@ class Bill {
this
.
platformFee
=
"0.00"
,
this
.
deliveryFee
=
"0.00"
,
this
.
deliveryState
=
0
,
this
.
courierName
=
''
,
this
.
courierPhone
=
''
,
// this.memberInfo = const []
});
factory
Bill
.
createBill
(
Map
<
String
,
dynamic
>
json
)
{
return
Bill
(
id:
json
[
'id'
],
totalSeluruhOrderan:
json
[
'total'
],
subTotalSeluruhOrderan:
json
[
'subtotal'
],
totalPerCustomer:
json
[
'total_per_customer'
],
customerName:
json
[
'customer_name'
],
tableStatus:
json
[
'table_status'
],
orderStatus:
json
[
'order_status'
],
state:
json
[
'order_state'
],
billDetail:
json
[
'order_detail'
],
paymentList:
json
[
'payment_list'
],
outStandingPay:
json
[
'outstanding'
],
invoice:
json
[
'invoice'
],
totalService:
json
[
'total_service'
],
totalServiceTax:
json
[
'total_service_tax'
],
outStandingIndividu:
json
[
'my_self_outstanding'
],
discountTotal:
json
[
'discount_total'
],
tableName:
json
[
'table_number'
],
isFeedBack:
json
[
'is_feedback'
],
dokuMinPay:
json
[
'doku_minimum_payment'
],
dateOrder:
json
[
'order_date'
],
packagingFee:
json
[
'packaging_fee'
],
platformFee:
json
[
'platform_fee'
],
deliveryFee:
json
[
'delivery_fee'
],
deliveryState:
json
[
'delivery_state'
]
??
0
// memberInfo: json['member_info']
);
id:
json
[
'id'
],
totalSeluruhOrderan:
json
[
'total'
],
subTotalSeluruhOrderan:
json
[
'subtotal'
],
totalPerCustomer:
json
[
'total_per_customer'
],
customerName:
json
[
'customer_name'
],
tableStatus:
json
[
'table_status'
],
orderStatus:
json
[
'order_status'
],
state:
json
[
'order_state'
],
billDetail:
json
[
'order_detail'
],
paymentList:
json
[
'payment_list'
],
outStandingPay:
json
[
'outstanding'
],
invoice:
json
[
'invoice'
],
totalService:
json
[
'total_service'
],
totalServiceTax:
json
[
'total_service_tax'
],
outStandingIndividu:
json
[
'my_self_outstanding'
],
discountTotal:
json
[
'discount_total'
],
tableName:
json
[
'table_number'
],
isFeedBack:
json
[
'is_feedback'
],
dokuMinPay:
json
[
'doku_minimum_payment'
],
dateOrder:
json
[
'order_date'
],
packagingFee:
json
[
'packaging_fee'
],
platformFee:
json
[
'platform_fee'
],
deliveryFee:
json
[
'delivery_fee'
],
deliveryState:
json
[
'delivery_state'
]
??
0
,
courierName:
json
[
'rdm_staff_courier_name'
]
??
''
,
courierPhone:
json
[
'rdm_staff_courier_mobile'
]
??
''
,
// memberInfo: json['member_info']
);
}
}
lib/models/bill_detail.dart
View file @
300ca720
import
'package:byod/models/variant_detail_bill.dart'
;
class
BillDetail
{
String
id
;
String
customerName
;
...
...
@@ -12,7 +14,7 @@ class BillDetail {
String
notes
;
String
imageUrl
;
// int paidStatus;
List
<
String
>
variant
;
List
<
VariantDetailBill
>
variant
;
BillDetail
(
{
required
this
.
id
,
...
...
lib/models/variant_detail_bill.dart
0 → 100644
View file @
300ca720
class
VariantDetailBill
{
String
caption
;
List
<
String
>
variantName
;
VariantDetailBill
({
required
this
.
caption
,
this
.
variantName
=
const
[]});
factory
VariantDetailBill
.
json
(
Map
<
String
,
dynamic
>
json
)
{
return
VariantDetailBill
(
caption:
json
[
'caption'
],
variantName:
json
[
'variant_name'
],
);
}
}
lib/ui/home/cat_list.dart
View file @
300ca720
// ignore_for_file: must_be_immutable
import
'package:byod/bloc/menu_selected_bar.dart'
;
import
'package:byod/helper/prefs.dart'
;
import
'package:byod/models/fav_group.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
...
@@ -52,8 +53,10 @@ class _CategoryListHomeState extends State<CategoryListHome> {
.
selectedBarMenu
(
i
,
widget
.
categoryList
[
i
].
id
);
widget
.
scrollController
.
animateTo
(
(
widget
.
favList
.
isNotEmpty
)
?
heighScrollWithImage
:
imageHeight
,
// 371 sudah dihituing pixelnya untuk awal banget dari menu item
?
animateToWhenCategoryClick
()
:
(
getIsDeliveryPickup
())
?
imageHeight
+
heighDeliveryPickupDetail
:
imageHeight
,
// 371 sudah dihituing pixelnya untuk awal banget dari menu item
duration:
const
Duration
(
milliseconds:
500
),
curve:
Curves
.
fastOutSlowIn
,
);
...
...
lib/ui/home/new_home2.dart
View file @
300ca720
This diff is collapsed.
Click to expand it.
lib/ui/viewbill/bottom_sheet_pickup_delivery.dart
0 → 100644
View file @
300ca720
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
import
'../../api/api.dart'
;
import
'../../bloc/change_delivery_pickup.dart'
;
import
'../../bloc/outlet_detail.dart'
;
import
'../../bloc/view_bill.dart'
;
import
'../../helper/helper.dart'
;
import
'../../helper/prefs.dart'
;
import
'../../helper/widget/button_dialog.dart'
;
import
'../../helper/widget/style.dart'
;
import
'../select_branch.dart'
;
Future
<
dynamic
>
modalBottomSelectOption
(
BuildContext
context
)
{
void
ontapOkeChangeOutlet
()
{
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
SelectBranch
(
isFormBill:
true
,
),
),
);
}
void
onTapCancelChange
()
{
Navigator
.
pop
(
context
);
}
return
showModalBottomSheet
(
backgroundColor:
backgroundWhite
,
context:
context
,
shape:
const
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
only
(
topLeft:
Radius
.
circular
(
19
),
topRight:
Radius
.
circular
(
19
),
),
),
barrierColor:
Colors
.
grey
.
withOpacity
(
0.9
),
builder:
(
contextModal
)
{
return
Container
(
padding:
const
EdgeInsets
.
symmetric
(
horizontal:
paddingLeftRight
,
),
child:
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Center
(
child:
Container
(
margin:
const
EdgeInsets
.
only
(
top:
8
,
bottom:
28
,
),
width:
50
,
height:
3
,
color:
disabledColor
,
),
),
defaultText
(
context
,
'Pilih Tipe Order'
,
style:
pickUpdeliveryStyleFont
(),
),
GestureDetector
(
onTap:
()
{
if
(
getIsPickup
())
{
Api
.
changeTypeOrder
(
typeOrderPickup
).
then
((
value
)
{
if
(
value
)
{
context
.
read
<
ChangeDeliveryPickupBloc
>()
.
toDelivery
(
false
);
setIsCustomerDelivery
(
false
);
context
.
read
<
ViewBillBloc
>().
getBill
();
setTypeOrder
(
typeOrderPickup
);
}
});
context
.
read
<
ExpandDetailOutlet
>().
show
(
false
);
Navigator
.
pop
(
context
);
}
else
{
String
textOnOk
=
'OK'
;
String
textOnCancel
=
'Batal'
;
String
title
=
'Info'
;
String
description
=
'''
Outlet ini tidak dapat menerima pickup order,
ingin ganti outlet ?
Note: Ganti outlet akan menyebabkan orderan anda saat ini hilang
'''
;
buttonDialogGlobal
(
context
,
title
,
description
,
textOnOk
,
textOnCancel
,
ontapOkeChangeOutlet
,
onTapCancelChange
,
okButtonColor:
buttonColor
,
);
}
},
child:
Container
(
padding:
const
EdgeInsets
.
only
(
top:
19
,
bottom:
25
,
left:
10
),
color:
backgroundWhite
,
child:
Row
(
children:
[
const
Image
(
image:
AssetImage
(
'assets/icons/pickup-icon.png'
),
),
const
SizedBox
(
width:
12
,
),
defaultText
(
context
,
'Pick Up'
,
style:
pickUpdeliveryStyleFont
(),
)
],
),
),
),
GestureDetector
(
onTap:
()
{
if
(!
getIsDelivery
())
{
String
textOnOk
=
'OK'
;
String
textOnCancel
=
'Batal'
;
String
title
=
'Info'
;
String
description
=
'''
Outlet ini tidak dapat delivery order,
ingin ganti outlet ?
Note: Ganti outlet akan menyebabkan orderan anda saat ini hilang
'''
;
buttonDialogGlobal
(
context
,
title
,
description
,
textOnOk
,
textOnCancel
,
ontapOkeChangeOutlet
,
onTapCancelChange
,
okButtonColor:
buttonColor
,
);
}
else
{
Api
.
changeTypeOrder
(
typeOrderDelivery
).
then
((
value
)
{
if
(
value
)
{
setIsCustomerDelivery
(
true
);
context
.
read
<
ChangeDeliveryPickupBloc
>()
.
toDelivery
(
true
);
context
.
read
<
ViewBillBloc
>().
getBill
();
setTypeOrder
(
typeOrderDelivery
);
}
});
context
.
read
<
ExpandDetailOutlet
>().
show
(
false
);
Navigator
.
pop
(
context
);
}
},
child:
Container
(
padding:
const
EdgeInsets
.
only
(
left:
10
,
bottom:
24
),
color:
backgroundWhite
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Row
(
children:
[
const
Image
(
image:
AssetImage
(
'assets/icons/delivery-icon.png'
),
),
const
SizedBox
(
width:
12
,
),
defaultText
(
context
,
'Delivery'
,
style:
pickUpdeliveryStyleFont
(),
)
],
),
// defaultText(
// context,
// '23 Menit',
// style: pickUpdeliveryStyleFont(),
// )
],
),
),
)
],
),
);
},
);
}
lib/ui/viewbill/component_name_user.dart
0 → 100644
View file @
300ca720
import
'package:flutter/material.dart'
;
import
'../../helper/helper.dart'
;
import
'../../helper/prefs.dart'
;
import
'../../helper/widget/style.dart'
;
import
'../../models/bill.dart'
;
import
'bottom_sheet_pickup_delivery.dart'
;
class
ComponentNameUser
extends
StatelessWidget
{
const
ComponentNameUser
({
Key
?
key
,
required
this
.
isDeliveryPickuup
,
this
.
dataBill
=
const
[],
required
this
.
backgroundColorComponent
,
this
.
isFromMenu
=
false
,
})
:
super
(
key:
key
);
final
bool
isDeliveryPickuup
;
final
List
<
Bill
>
dataBill
;
final
Color
backgroundColorComponent
;
final
bool
isFromMenu
;
@override
Widget
build
(
BuildContext
context
)
{
String
customerName
;
if
(
dataBill
.
isEmpty
)
{
customerName
=
getCustomerName
();
}
else
{
customerName
=
dataBill
[
0
].
customerName
;
}
return
Container
(
width:
double
.
infinity
,
color:
backgroundColorComponent
.
withOpacity
(
0.9
),
padding:
const
EdgeInsets
.
symmetric
(
vertical:
10
),
// height: 40,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
Column
(
mainAxisSize:
MainAxisSize
.
min
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Container
(
padding:
(
isFromMenu
)
?
null
:
const
EdgeInsets
.
symmetric
(
horizontal:
paddingLeftRight
),
child:
defaultText
(
context
,
(
isDeliveryPickuup
)
?
(
getIsCustomerDelivery
())
?
'Delivery'
:
'Pickup'
:
'Meja
${dataBill[0].tableName}
'
,
style:
viewbillStyle
()),
),
Container
(
padding:
(
isFromMenu
)
?
null
:
const
EdgeInsets
.
only
(
left:
paddingLeftRight
,
right:
paddingLeftRight
,
// bottom: 18,
),
child:
defaultText
(
context
,
customerName
,
style:
customerNameViewbill
()),
),
],
),
(
isDeliveryPickuup
)
?
GestureDetector
(
onTap:
()
{
modalBottomSelectOption
(
context
);
},
child:
Container
(
height:
30
,
width:
69
,
margin:
(
isFromMenu
)
?
null
:
const
EdgeInsets
.
only
(
right:
20
,
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
40
),
color:
buttonColor
,
),
child:
Center
(
child:
defaultText
(
context
,
'Ganti'
,
style:
addButton
(
font:
8
,
),
),
),
),
)
:
const
SizedBox
()
],
),
);
}
}
lib/ui/viewbill/delivery_pickup_state.dart
0 → 100644
View file @
300ca720
This diff is collapsed.
Click to expand it.
lib/ui/viewbill/order_view_bill_new.dart
View file @
300ca720
...
...
@@ -214,6 +214,40 @@ class _OrderViewBillNewState extends State<OrderViewBillNew> {
fontWeight:
FontWeight
.
w300
,
),
),
(
widget
.
billDetail
.
variant
.
isNotEmpty
)
?
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisSize:
MainAxisSize
.
min
,
children:
[
for
(
int
k
=
0
;
k
<
widget
.
billDetail
.
variant
.
length
;
k
++)
Row
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
defaultText
(
context
,
"
${widget.billDetail.variant[k].caption}
: "
,
style:
viewbillStyle
(
font:
12
,
fontWeight:
FontWeight
.
w300
,
),
),
defaultText
(
context
,
widget
.
billDetail
.
variant
[
k
].
variantName
.
join
(
', '
),
style:
viewbillStyle
(
font:
12
,
fontWeight:
FontWeight
.
w300
,
),
)
],
)
],
)
:
const
SizedBox
(),
const
SizedBox
(
height:
6
,
),
...
...
@@ -392,9 +426,19 @@ class _OrderViewBillNewState extends State<OrderViewBillNew> {
)
:
const
SizedBox
(),
(!
widget
.
lastItem
)
?
const
Divider
(
thickness:
2
,
color:
backgroundColorViewBill
,
?
Container
(
padding:
(
isVisibleAddRemoveQuantityButtonCheckout
(
widget
.
isHistory
,
widget
.
billDetail
.
orderStatus
,
widget
.
bill
.
state
))
?
null
:
const
EdgeInsets
.
only
(
top:
15
,
),
child:
const
Divider
(
thickness:
2
,
color:
backgroundColorViewBill
,
),
)
:
const
SizedBox
()
],
...
...
lib/ui/viewbill/timeline.dart
deleted
100644 → 0
View file @
bdbf0d11
This diff is collapsed.
Click to expand it.
lib/ui/viewbill/view_bill_new.dart
View file @
300ca720
This diff is collapsed.
Click to expand it.
lib/ui/webview/app_bar_webview.dart
View file @
300ca720
// ignore_for_file: sized_box_for_whitespace
import
'package:byod/ui/home/new_home2.dart'
;
import
'package:byod/ui/viewbill/view_bill_new.dart'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_bloc/flutter_bloc.dart'
;
...
...
@@ -10,12 +11,16 @@ import '../../helper/widget/style.dart';
import
'../select_branch.dart'
;
class
CustomAppBar
extends
StatelessWidget
{
const
CustomAppBar
(
{
Key
?
key
,
required
this
.
titleAppBar
,
required
this
.
isFromSelectBranch
})
:
super
(
key:
key
);
const
CustomAppBar
({
Key
?
key
,
required
this
.
titleAppBar
,
required
this
.
isFromSelectBranch
,
required
this
.
isFromMenu
,
})
:
super
(
key:
key
);
final
String
titleAppBar
;
final
bool
isFromSelectBranch
;
final
bool
isFromMenu
;
@override
Widget
build
(
BuildContext
context
)
{
...
...
@@ -49,6 +54,18 @@ class CustomAppBar extends StatelessWidget {
),
),
);
}
else
if
(
isFromMenu
)
{
context
.
read
<
AddressUser
>().
getAddressUser
(
context
,
isGetBranchList:
true
,
isCallDeliveryCharge:
false
,
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
(),
),
);
}
else
{
Navigator
.
pushReplacement
(
context
,
...
...
lib/ui/webview/webview.dart
View file @
300ca720
...
...
@@ -133,6 +133,7 @@
// }
import
'package:byod/bloc/address_user_bloc.dart'
;
import
'package:byod/ui/home/new_home2.dart'
;
import
'package:byod/ui/select_branch.dart'
;
import
'package:byod/ui/viewbill/view_bill_new.dart'
;
import
'package:byod/ui/webview/app_bar_webview.dart'
;
...
...
@@ -150,10 +151,12 @@ class WebViewMap extends StatefulWidget {
required
this
.
titleAppBar
,
required
this
.
url
,
this
.
isFromSelectBranch
=
false
,
this
.
isFromMenu
=
false
,
});
final
String
titleAppBar
;
final
String
url
;
final
bool
isFromSelectBranch
;
final
bool
isFromMenu
;
@override
State
<
WebViewMap
>
createState
()
=>
_WebViewMapState
();
...
...
@@ -171,6 +174,15 @@ class _WebViewMapState extends State<WebViewMap> {
builder:
(
_
)
=>
const
SelectBranch
(),
),
);
}
else
if
(
widget
.
isFromMenu
==
true
)
{
context
.
read
<
AddressUser
>().
getAddressUser
(
context
,
isGetBranchList:
false
,
isCallDeliveryCharge:
false
);
Navigator
.
push
(
context
,
MaterialPageRoute
(
builder:
(
_
)
=>
const
NewHome2
(),
),
);
}
else
{
context
.
read
<
AddressUser
>()
...
...
@@ -207,8 +219,10 @@ class _WebViewMapState extends State<WebViewMap> {
child:
Column
(
children:
[
CustomAppBar
(
titleAppBar:
widget
.
titleAppBar
,
isFromSelectBranch:
widget
.
isFromSelectBranch
),
titleAppBar:
widget
.
titleAppBar
,
isFromSelectBranch:
widget
.
isFromSelectBranch
,
isFromMenu:
widget
.
isFromMenu
,
),
Expanded
(
child:
WebViewX
(
width:
MediaQuery
.
of
(
context
).
size
.
width
,
...
...
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