update pickup and box list

This commit is contained in:
Thinzar Win
2020-06-26 16:17:40 +06:30
parent 59cb172713
commit ace9254093
20 changed files with 1266 additions and 213 deletions

View File

@@ -1,4 +1,5 @@
import 'package:fcs/model/shipment_model.dart';
import 'package:fcs/pages_fcs/shipping_address_row.dart';
import 'package:fcs/vo/shipping_address.dart';
import 'package:fcs/widget/bottom_up_page_route.dart';
import 'package:fcs/widget/local_text.dart';
@@ -216,7 +217,7 @@ class _ProfileState extends State<Profile> {
));
final logoutbutton = Container(
padding: EdgeInsets.only( left: 20.0, right: 24.0),
padding: EdgeInsets.only(left: 20.0, right: 24.0),
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.0),
child: Card(
@@ -330,7 +331,7 @@ class _ProfileState extends State<Profile> {
child: Align(
alignment: Alignment.bottomRight,
child: Container(
width: 120,
width: 130,
height: 40,
child: FloatingActionButton.extended(
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
@@ -340,6 +341,7 @@ class _ProfileState extends State<Profile> {
BottomUpPageRoute(ShippingAddressEditor()),
);
},
icon: Icon(Icons.add),
label: Text(
'Add Shipping\nAddress',
style: TextStyle(fontSize: 12),
@@ -357,72 +359,14 @@ class _ProfileState extends State<Profile> {
List<Widget> getAddressList(
BuildContext context, List<ShippingAddress> addresses) {
return addresses.asMap().entries.map((s) {
return Container(
padding: EdgeInsets.only(left: 10, right: 10),
child: InkWell(
onTap: () {
Navigator.push(
context,
BottomUpPageRoute(
ShippingAddressEditor(shippingAddress: s.value)),
);
},
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
child: new Padding(
padding: const EdgeInsets.symmetric(vertical: 10.0),
child: Row(
children: <Widget>[
Padding(
padding: EdgeInsets.all(5.0),
child: Icon(
SimpleLineIcons.location_pin,
color: primaryColor,
)),
new Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
s.value.fullName == null
? ''
: s.value.fullName,
style: new TextStyle(
fontSize: 15.0, color: Colors.black),
),
),
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: new Text(
s.value.phoneNumber == null
? ''
: s.value.phoneNumber,
style: new TextStyle(
fontSize: 14.0, color: Colors.grey),
),
),
],
),
],
),
),
),
IconButton(
padding: EdgeInsets.only(right: 30),
icon: Icon(Icons.delete, color: Colors.black45),
onPressed: null)
],
),
s.key == addresses.length - 1
? Container()
: Divider(color: Colors.black)
],
),
),
return InkWell(
onTap: () {
Navigator.push(
context,
BottomUpPageRoute(ShippingAddressEditor(shippingAddress: s.value)),
);
},
child: ShippingAddressRow(shippingAddress: s.value, index: s.key),
);
}).toList();
}