add fcs shipment info

This commit is contained in:
Thinzar Win
2020-10-15 17:33:43 +06:30
parent caf600e4eb
commit 2a422fc4ea
16 changed files with 406 additions and 295 deletions

View File

@@ -2,6 +2,8 @@ import 'package:fcs/helpers/theme.dart';
import 'package:fcs/localization/app_translations.dart';
import 'package:fcs/pages/shipment/model/shipment_model.dart';
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
import 'package:fcs/pages/widgets/local_popup_menu_button.dart';
import 'package:fcs/pages/widgets/local_popupmenu.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter/cupertino.dart';
@@ -19,6 +21,7 @@ class ShipmentList extends StatefulWidget {
class _ShipmentListState extends State<ShipmentList> {
bool _isLoading = false;
bool _showDelivered = false;
@override
void initState() {
@@ -33,6 +36,16 @@ class _ShipmentListState extends State<ShipmentList> {
@override
Widget build(BuildContext context) {
var pickupModel = Provider.of<ShipmentModel>(context);
final popupMenu = LocalPopupMenuButton(
popmenus: [
LocalPopupMenu(
id: 1, textKey: "shipment.popupmenu.active", selected: true),
LocalPopupMenu(id: 2, textKey: "shipment.popupmenu.delivered")
],
popupMenuCallback: (p) => this.setState(() {
_showDelivered = p.id == 2;
}),
);
return LocalProgress(
inAsyncCall: _isLoading,
child: DefaultTabController(
@@ -56,6 +69,7 @@ class _ShipmentListState extends State<ShipmentList> {
iconSize: 30,
// onPressed: () => showPlacesSearch(context),
),
popupMenu
],
),
floatingActionButton: FloatingActionButton.extended(