modify ui

This commit is contained in:
PhyoThandar
2020-06-26 16:04:40 +06:30
parent 59cb172713
commit e8d5f24a99
18 changed files with 1238 additions and 189 deletions

View File

@@ -37,78 +37,65 @@ class _PackageListState extends State<PackageList> {
@override
Widget build(BuildContext context) {
var packageModel = Provider.of<PackageModel>(context);
return LocalProgress(
inAsyncCall: _isLoading,
child: DefaultTabController(
length: 5,
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: primaryColor,
title: Text(AppTranslations.of(context).text("package.title")),
actions: <Widget>[
// IconButton(
// icon: Icon(
// Ionicons.ios_barcode,
// color: Colors.white,
// ),
// iconSize: 30,
// onPressed: () {
// Navigator.push(
// context,
// BottomUpPageRoute(BarcodeScreenPage()),
// );
// },
// ),
IconButton(
icon: Icon(
Icons.search,
color: Colors.white,
),
iconSize: 30,
onPressed: () => showPlacesSearch(context),
child: Scaffold(
appBar: AppBar(
centerTitle: true,
leading: new IconButton(
icon: new Icon(Icons.close),
onPressed: () => Navigator.of(context).pop(),
),
backgroundColor: primaryColor,
title: Text(AppTranslations.of(context).text("package.title")),
actions: <Widget>[
// IconButton(
// icon: Icon(
// Ionicons.ios_barcode,
// color: Colors.white,
// ),
// iconSize: 30,
// onPressed: () {
// Navigator.push(
// context,
// BottomUpPageRoute(BarcodeScreenPage()),
// );
// },
// ),
IconButton(
icon: Icon(
Icons.search,
color: Colors.white,
),
],
bottom: TabBar(
dragStartBehavior: DragStartBehavior.start,
unselectedLabelColor: Colors.grey,
tabs: [
Tab(
text: "Received",
),
Tab(text: "Processed"),
Tab(
text: "Shipped",
),
Tab(text: "Arrived"),
Tab(
text: "Delivered",
),
],
iconSize: 30,
onPressed: () => showPlacesSearch(context),
),
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
_newPickup();
},
icon: Icon(Icons.add),
label: Text(AppTranslations.of(context).text("package.new")),
backgroundColor: primaryColor,
),
body: TabBarView(
children: [
_upComing(),
_completed(),
_shipped(),
_arrived(),
_delivered(),
],
)),
),
],
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {
_newPickup();
},
icon: Icon(Icons.add),
label: Text(AppTranslations.of(context).text("package.new")),
backgroundColor: primaryColor,
),
body: new ListView.separated(
separatorBuilder: (context, index) => Divider(
color: Colors.black,
),
scrollDirection: Axis.vertical,
padding: EdgeInsets.only(top: 15),
shrinkWrap: true,
itemCount: packageModel.getPackages.length,
itemBuilder: (BuildContext context, int index) {
return PackageListRow(
package: packageModel.getPackages[index],
isReadOnly: false,
);
})),
);
}