This commit is contained in:
Thinzar Win
2020-10-07 19:53:47 +06:30
11 changed files with 265 additions and 326 deletions

View File

@@ -242,22 +242,37 @@
"Delivery End ================================================================":"", "Delivery End ================================================================":"",
"FCS Shipment Start ================================================================":"", "FCS Shipment Start ================================================================":"",
"shipment.title":"FCS Shipments", "FCSshipment.title":"FCS Shipments",
"shipment.list.title":"FCS SHIPMENTS", "FCSshipment.list.title":"FCS SHIPMENTS",
"shipment.add":"New FCS shipment", "FCSshipment.add":"New FCS shipment",
"shipment.form.title":"FCS SHIPMENT", "FCSshipment.form.title":"FCS SHIPMENT",
"shipment.number":"FCS Shipment Number", "FCSshipment.number":"FCS Shipment Number",
"FCSshipment.cutoff_date":"Cutoff Date",
"FCSshipment.ETA":"ETA",
"FCSshipment.departure_date":"Departure Date",
"FCSshipment.shipment_type":"Shipment Type",
"FCSshipment.consignee":"Consignee",
"FCSshipment.port_of_loading":"Port of Loading",
"FCSshipment.final_destination":"Final Destination",
"FCSshipment.status":"Status",
"FCSshipment.remark":"Remark",
"FCSshipment.commercial_invoice":"Download Commercial Invoice",
"FCSshipment.packing_list":"Download Packing List",
"FCSshipment.dms":"Download DMS",
"FCSshipment.cargo_manifest":"Download Cargo Manifest",
"FCSshipment.create":"Create FCS Shipment",
"FCSshipment.update":"Update FCS Shipment",
"FCS Shipment End ================================================================":"", "FCS Shipment End ================================================================":"",
"Shipment Start ================================================================":"", "Shipment Start ================================================================":"",
"pickup": "Shipments", "shipment": "Shipments",
"pickup.title": "SHIPMENTS", "shipment.title": "SHIPMENTS",
"pickup.new": "New Shipment", "shipment.new": "New Shipment",
"pickup.edit.title": "SHIPMENT", "shipment.edit.title": "SHIPMENT",
"pickup.date": "Pickup Date", "shipment.date": "Pickup Date",
"pickup.location_time": "Pickup Location / Time", "shipment.location_time": "Pickup Location / Time",
"pickup.information": "Pickup Informations", "shipment.information": "Pickup Informations",
"pickup.recipient_information": "Recipient Informations", "shipment.recipient_information": "Recipient Informations",
"Shipment End ================================================================":"", "Shipment End ================================================================":"",
"Rate Start ================================================================":"", "Rate Start ================================================================":"",

View File

@@ -242,22 +242,37 @@
"Delivery End ================================================================":"", "Delivery End ================================================================":"",
"FCS Shipment Start ================================================================":"", "FCS Shipment Start ================================================================":"",
"shipment.title":"FCS တင်ပို့ခြင်းများ", "FCSshipment.title":"FCS တင်ပို့ခြင်းများ",
"shipment.list.title":"FCS တင်ပို့ခြင်းများ", "FCSshipment.list.title":"FCS တင်ပို့ခြင်းများ",
"shipment.add":"New FCS shipment", "FCSshipment.add":"FCS တင်ပို့ခြင်းအသစ်",
"shipment.form.title":"FCS SHIPMENT", "FCSshipment.form.title":"FCS တင်ပို့ခြင်း",
"shipment.number":"FCS Shipment Number", "FCSshipment.number":"FCS တင်ပို့နံပါတ်",
"FCSshipment.cutoff_date":"သတ်မှတ်ရက်",
"FCSshipment.ETA":"ခန့်မှန်းရောက်ချိန်",
"FCSshipment.departure_date":"ထွက်ခွာသည့်ရက်",
"FCSshipment.shipment_type":"တင်ပို့မှုအမျိုးအစား",
"FCSshipment.consignee":"ပစ္စည်းလက်ခံသူ",
"FCSshipment.port_of_loading":"ဆိပ်ကမ်း",
"FCSshipment.final_destination":"ဆိုက်ရောက်နေရာ",
"FCSshipment.status":"အခြေအနေ",
"FCSshipment.remark":"မှတ်ချက်",
"FCSshipment.commercial_invoice":"Download Commercial Invoice",
"FCSshipment.packing_list":"Download Packing List",
"FCSshipment.dms":"Download DMS",
"FCSshipment.cargo_manifest":"Download Cargo Manifest",
"FCSshipment.create":"FCS တင်ပို့ခြင်းပြုလုပ်ရန်",
"FCSshipment.update":"FCS တင်ပို့ခြင်းပြင်ရန်",
"FCS Shipment End ================================================================":"", "FCS Shipment End ================================================================":"",
"Shipment Start ================================================================":"", "Shipment Start ================================================================":"",
"pickup": "Shipments", "shipment": "Shipments",
"pickup.title": "SHIPMENTS", "shipment.title": "SHIPMENTS",
"pickup.new": "New Shipment", "shipment.new": "New Shipment",
"pickup.edit.title": "PICKUP", "shipment.edit.title": "PICKUP",
"pickup.date": "Pickup Date", "shipment.date": "Pickup Date",
"pickup.location_time": "Pickup Location / Time", "shipment.location_time": "Pickup Location / Time",
"pickup.information": "Pickup Informations", "shipment.information": "Pickup Informations",
"pickup.recipient_information": "Recipient Informations", "shipment.recipient_information": "Recipient Informations",
"Shipment End ================================================================":"", "Shipment End ================================================================":"",
"Rate Start ================================================================":"", "Rate Start ================================================================":"",

View File

@@ -2,8 +2,13 @@ import 'package:fcs/domain/entities/fcs_shipment.dart';
import 'package:fcs/helpers/theme.dart'; import 'package:fcs/helpers/theme.dart';
import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/localization/app_translations.dart';
import 'package:fcs/pages/fcs_shipment/model/fcs_shipment_model.dart'; import 'package:fcs/pages/fcs_shipment/model/fcs_shipment_model.dart';
import 'package:fcs/pages/main/model/language_model.dart';
import 'package:fcs/pages/main/model/main_model.dart'; import 'package:fcs/pages/main/model/main_model.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/input_text.dart';
import 'package:fcs/pages/widgets/label_widgets.dart'; import 'package:fcs/pages/widgets/label_widgets.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/popupmenu.dart';
import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/progress.dart';
import 'package:flutter_icons/flutter_icons.dart'; import 'package:flutter_icons/flutter_icons.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@@ -116,124 +121,36 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var shipmentModel = Provider.of<FcsShipmentModel>(context); var shipmentModel = Provider.of<FcsShipmentModel>(context);
var languageModel = Provider.of<LanguageModel>(context);
final cargoBtn = Container( final createBtn = fcsButton(
padding: EdgeInsets.only(top: 5), context,
child: Align( getLocalString(context, "FCSshipment.create"),
alignment: Alignment.bottomCenter,
child: Center(
child: Container(
width: 250,
child: FlatButton(
child: Text('Download Cargo Manifest'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
Navigator.pop(context);
},
),
))),
); );
final commercialBtn = Container( final updateBtn = fcsButton(
padding: EdgeInsets.only(top: 20), context,
child: Align( getLocalString(context, "FCSshipment.update"),
alignment: Alignment.bottomCenter,
child: Center(
child: Container(
width: 250,
child: FlatButton(
child: Text('Download Commercial Invoice'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
Navigator.pop(context);
},
),
))),
); );
final packingBtn = Container(
padding: EdgeInsets.only(top: 5),
child: Align(
alignment: Alignment.bottomCenter,
child: Center(
child: Container(
width: 250,
child: FlatButton(
child: Text('Download Packing List'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
Navigator.pop(context);
},
),
))),
);
final dmsBtn = Container(
padding: EdgeInsets.only(top: 5),
child: Align(
alignment: Alignment.bottomCenter,
child: Center(
child: Container(
width: 250,
child: FlatButton(
child: Text('Download DMS'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
Navigator.pop(context);
},
),
))),
);
final createBtn = Container(
padding: EdgeInsets.only(top: 20),
child: Align(
alignment: Alignment.bottomCenter,
child: Center(
child: Container(
width: 250,
child: FlatButton(
child: Text('Create FCS Shipment'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
Navigator.pop(context);
},
),
))),
);
final updateBtn = Container(
padding: EdgeInsets.only(top: 5),
child: Align(
alignment: Alignment.bottomCenter,
child: Center(
child: Container(
width: 250,
child: FlatButton(
child: Text('Update FCS Shipment'),
color: primaryColor,
textColor: Colors.white,
onPressed: () {
Navigator.pop(context);
},
),
))),
);
return LocalProgress( return LocalProgress(
inAsyncCall: _isLoading, inAsyncCall: _isLoading,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true, centerTitle: true,
shadowColor: Colors.transparent,
leading: new IconButton( leading: new IconButton(
icon: new Icon(Icons.close), icon: new Icon(Icons.close, color: primaryColor),
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
backgroundColor: primaryColor, backgroundColor: Colors.white,
title: Text(AppTranslations.of(context).text("shipment.form.title")), title: LocalText(
context,
"FCSshipment.form.title",
color: primaryColor,
fontSize: 18,
),
actions: [menuPopWidget(context)],
), ),
body: Card( body: Card(
child: Column( child: Column(
@@ -244,127 +161,155 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
child: ListView(children: <Widget>[ child: ListView(children: <Widget>[
// _showCustomerData(mainModel.customer), // _showCustomerData(mainModel.customer),
widget.shipment == null widget.shipment == null
? fcsInput('FCS Shipment Number', Ionicons.ios_airplane, ? InputText(
controller: _shipmentNumberController) labelTextKey: "FCSshipment.number",
: Container( iconData: Ionicons.ios_airplane,
child: TextFormField( controller: _shipmentNumberController,
controller: _shipmentNumberController, )
readOnly: true, : DisplayText(
decoration: InputDecoration( iconData: Ionicons.ios_airplane,
fillColor: Colors.white, labelText: "FCSshipment.number",
labelText: 'FCS Shipment Number', text: _shipmentNumberController.text),
labelStyle:
TextStyle(fontSize: 16, color: Colors.grey),
filled: true,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
icon: Icon(
Ionicons.ios_airplane,
color: primaryColor,
),
)),
),
widget.shipment == null widget.shipment == null
? Container( ? InputText(
padding: EdgeInsets.only(top: 5), labelTextKey: "FCSshipment.cutoff_date",
child: fcsInput('Cutoff Date', Icons.date_range, iconData: Icons.date_range,
controller: _cutoffDateController), controller: _cutoffDateController,
) )
: Container(), : Container(),
Container(
padding: InputText(
EdgeInsets.only(top: widget.shipment == null ? 5 : 0), labelTextKey: "FCSshipment.ETA",
child: fcsInput('ETA', Icons.date_range, iconData: Icons.date_range,
controller: _arrivalDateController), controller: _arrivalDateController,
), ),
Container(
padding: EdgeInsets.only(top: 5), InputText(
child: fcsInput('Departure Date', Icons.date_range, labelTextKey: "FCSshipment.departure_date",
controller: _departureDateControler), iconData: Icons.date_range,
controller: _departureDateControler,
), ),
widget.shipment == null widget.shipment == null
? Container( ? DropdownButtonFormField(
padding: EdgeInsets.only(top: 5), decoration: InputDecoration(
child: DropdownButtonFormField( enabledBorder: UnderlineInputBorder(
decoration: InputDecoration( borderSide: BorderSide(color: primaryColor)),
fillColor: Colors.white, fillColor: Colors.white,
labelText: 'FCS Shipment Type', labelStyle: languageModel.isEng
icon: Icon(Ionicons.ios_airplane, ? labelStyle
color: primaryColor)), : labelStyleMM,
items: shipmentModel.shipmentType labelText: AppTranslations.of(context)
.map((e) => .text('FCSshipment.shipment_type'),
DropdownMenuItem(child: Text(e), value: e)) icon: Icon(Ionicons.ios_airplane,
.toList(), color: primaryColor)),
onChanged: (selected) => { items: shipmentModel.shipmentType
setState(() { .map((e) =>
_currentShipment = selected; DropdownMenuItem(child: Text(e), value: e))
}) .toList(),
}, onChanged: (selected) => {
), setState(() {
_currentShipment = selected;
})
},
) )
: Container(), : Container(),
widget.shipment == null widget.shipment == null
? Container( ? InputText(
padding: EdgeInsets.only(top: 5), labelTextKey: 'FCSshipment.consignee',
child: fcsInput('Consignee', Icons.work, iconData: Icons.work,
controller: _consigneeController), controller: _consigneeController)
)
: Container(), : Container(),
widget.shipment == null widget.shipment == null
? Container( ? InputText(
padding: EdgeInsets.only(top: 5), labelTextKey: 'FCSshipment.port_of_loading',
child: fcsInput( iconData: FontAwesomeIcons.ship,
'Port of Loading', FontAwesomeIcons.ship, controller: _portController)
controller: _portController),
)
: Container(), : Container(),
widget.shipment == null widget.shipment == null
? Container( ? InputText(
padding: EdgeInsets.only(top: 5), labelTextKey: 'FCSshipment.final_destination',
child: fcsInput('Final Destination', iconData: MaterialCommunityIcons.location_enter,
MaterialCommunityIcons.location_enter, controller: _destinationController)
controller: _destinationController),
)
: Container(), : Container(),
widget.shipment == null widget.shipment == null
? Container() ? Container()
: Container( : Container(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: TextFormField( child: DisplayText(
controller: _statusController, text: _statusController.text,
cursorColor: primaryColor, iconData: Icons.av_timer,
decoration: InputDecoration( labelText: 'FCSshipment.status',
fillColor: Colors.white, )),
labelText: 'Status',
filled: true,
labelStyle: TextStyle(
fontSize: 16, color: Colors.grey),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.grey, width: 1.0)),
icon: Icon(Icons.av_timer,
color: primaryColor))),
),
widget.shipment == null widget.shipment == null
? Container() ? Container()
: Container( : InputText(
padding: EdgeInsets.only(top: 5), labelTextKey: 'FCSshipment.remark',
child: fcsInput('Remark', MaterialCommunityIcons.note, iconData: MaterialCommunityIcons.note,
controller: _remarkController), controller: _remarkController),
),
widget.shipment == null ? Container() : commercialBtn,
widget.shipment == null ? Container() : packingBtn,
widget.shipment == null ? Container() : dmsBtn,
widget.shipment == null ? Container() : cargoBtn,
widget.shipment == null ? createBtn : updateBtn,
SizedBox(height: 15)
]), ]),
)), )),
widget.shipment == null ? createBtn : updateBtn,
SizedBox(height: 15)
], ],
), ),
), ),
), ),
); );
} }
Widget menuPopWidget(BuildContext context) {
return PopupMenuButton<PopupMenu>(
elevation: 3.2,
icon: Icon(Icons.more_vert, color: primaryColor),
tooltip: 'This is tooltip',
onSelected: (choice) {
if (choice.id == 1) {
Navigator.pop(context);
} else if (choice.id == 2) {
Navigator.pop(context);
} else if (choice.id == 3) {
Navigator.pop(context);
} else if (choice.id == 4) {
Navigator.pop(context);
}
},
itemBuilder: (BuildContext context) {
List<PopupMenu> menuPopup = <PopupMenu>[
PopupMenu(
id: 3,
status: "FCSshipment.commercial_invoice",
),
PopupMenu(id: 2, status: "FCSshipment.packing_list"),
PopupMenu(
id: 5,
status: "FCSshipment.dms",
),
PopupMenu(
id: 4,
status: "FCSshipment.cargo_manifest",
),
];
return menuPopup.map((PopupMenu choice) {
return PopupMenuItem<PopupMenu>(
value: choice,
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
padding: EdgeInsets.only(left: 15),
child: LocalText(
context,
choice.status,
color: primaryColor,
)),
],
),
);
}).toList();
});
}
} }

View File

@@ -31,10 +31,10 @@ class _FcsShipmentListState extends State<FcsShipmentList> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var shipmentModel = Provider.of<FcsShipmentModel>(context);
return LocalProgress( return LocalProgress(
inAsyncCall: _isLoading, inAsyncCall: _isLoading,
child: DefaultTabController(
length: 3,
child: Scaffold( child: Scaffold(
appBar: AppBar( appBar: AppBar(
centerTitle: true, centerTitle: true,
@@ -43,7 +43,7 @@ class _FcsShipmentListState extends State<FcsShipmentList> {
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
backgroundColor: primaryColor, backgroundColor: primaryColor,
title: LocalText(context, 'shipment.list.title', title: LocalText(context, 'FCSshipment.list.title',
color: Colors.white, fontSize: 20), color: Colors.white, fontSize: 20),
actions: <Widget>[ actions: <Widget>[
IconButton( IconButton(
@@ -55,99 +55,36 @@ class _FcsShipmentListState extends State<FcsShipmentList> {
// onPressed: () => showPlacesSearch(context), // onPressed: () => showPlacesSearch(context),
), ),
], ],
bottom: TabBar(
unselectedLabelColor: Colors.grey,
tabs: [
Tab(
text: "Upcoming",
),
Tab(text: "Completed"),
Tab(text: "Canceled"),
],
),
), ),
floatingActionButton: FloatingActionButton.extended( floatingActionButton: FloatingActionButton.extended(
onPressed: () { onPressed: () {
_newShipment(); _newShipment();
}, },
icon: Icon(Icons.add), icon: Icon(Icons.add),
label: Text(AppTranslations.of(context).text("shipment.add")), label: LocalText(context, "FCSshipment.add", color: Colors.white),
backgroundColor: primaryColor, backgroundColor: primaryColor,
), ),
body: TabBarView( body: Column(
children: [_upComing(), _completed(), _canceled()], children: <Widget>[
)), Expanded(
), child: new ListView.separated(
); separatorBuilder: (context, index) => Divider(
color: Colors.black,
),
scrollDirection: Axis.vertical,
padding: EdgeInsets.only(top: 15),
shrinkWrap: true,
itemCount: shipmentModel.shipments.length,
itemBuilder: (BuildContext context, int index) {
return FcsShipmentListRow(
shipment: shipmentModel.shipments[index]);
}),
),
],
)));
} }
_newShipment() { _newShipment() {
Navigator.of(context).push(BottomUpPageRoute(FcsShipmentEditor())); Navigator.of(context).push(BottomUpPageRoute(FcsShipmentEditor()));
} }
Widget _upComing() {
var shipmentModel = Provider.of<FcsShipmentModel>(context);
return Column(
children: <Widget>[
Expanded(
child: new ListView.separated(
separatorBuilder: (context, index) => Divider(
color: Colors.black,
),
scrollDirection: Axis.vertical,
padding: EdgeInsets.only(top: 15),
shrinkWrap: true,
itemCount: shipmentModel.upcoming.length,
itemBuilder: (BuildContext context, int index) {
return FcsShipmentListRow(
shipment: shipmentModel.upcoming[index]);
}),
),
],
);
}
Widget _completed() {
var shipmentModel = Provider.of<FcsShipmentModel>(context);
return Column(
children: <Widget>[
Expanded(
child: new ListView.separated(
separatorBuilder: (context, index) => Divider(
color: Colors.black,
),
scrollDirection: Axis.vertical,
padding: EdgeInsets.only(top: 15),
shrinkWrap: true,
itemCount: shipmentModel.completed.length,
itemBuilder: (BuildContext context, int index) {
return FcsShipmentListRow(
shipment: shipmentModel.completed[index]);
}),
),
],
);
}
Widget _canceled() {
var shipmentModel = Provider.of<FcsShipmentModel>(context);
return Column(
children: <Widget>[
Expanded(
child: new ListView.separated(
separatorBuilder: (context, index) => Divider(
color: Colors.black,
),
scrollDirection: Axis.vertical,
padding: EdgeInsets.only(top: 15),
shrinkWrap: true,
itemCount: shipmentModel.canceled.length,
itemBuilder: (BuildContext context, int index) {
return FcsShipmentListRow(
shipment: shipmentModel.canceled[index]);
}),
),
],
);
}
} }

View File

@@ -208,7 +208,7 @@ class _HomePageState extends State<HomePage> {
btnCallback: () => btnCallback: () =>
Navigator.of(context).push(BottomUpPageRoute(BoxList()))); Navigator.of(context).push(BottomUpPageRoute(BoxList())));
final pickUpBtn = TaskButton("pickup", final pickUpBtn = TaskButton("shipment",
icon: SimpleLineIcons.direction, icon: SimpleLineIcons.direction,
btnCallback: () => btnCallback: () =>
Navigator.of(context).push(BottomUpPageRoute(ShipmentList()))); Navigator.of(context).push(BottomUpPageRoute(ShipmentList())));
@@ -218,7 +218,7 @@ class _HomePageState extends State<HomePage> {
btnCallback: () => btnCallback: () =>
Navigator.of(context).push(BottomUpPageRoute(ShipmentRates()))); Navigator.of(context).push(BottomUpPageRoute(ShipmentRates())));
final fcsShipmentBtn = TaskButton("shipment.title", final fcsShipmentBtn = TaskButton("FCSshipment.title",
icon: Ionicons.ios_airplane, icon: Ionicons.ios_airplane,
btnCallback: () => btnCallback: () =>
Navigator.of(context).push(BottomUpPageRoute(FcsShipmentList()))); Navigator.of(context).push(BottomUpPageRoute(FcsShipmentList())));

View File

@@ -86,13 +86,6 @@ class _ShipmentRatesEditState extends State<ShipmentRatesEdit> {
minWigBox, minWigBox,
feeBox, feeBox,
ratioBox, ratioBox,
// fcsInput("Min Weight for Free delivery within Yangon",
// FontAwesomeIcons.weightHanging,
// value: "10"),
// fcsInput("Delivery fees", Icons.attach_money, value: "5"),
// SizedBox(height: 10),
// fcsInput("Volumetric Ratio", Icons.attach_money,
// value: "166.36"),
SizedBox(height: 10), SizedBox(height: 10),
ExpansionTile( ExpansionTile(
title: Text( title: Text(

View File

@@ -11,6 +11,7 @@ import 'package:fcs/pages/shipment_address/model/shipment_address_model.dart';
import 'package:fcs/pages/shipment_address/shipping_address_row.dart'; import 'package:fcs/pages/shipment_address/shipping_address_row.dart';
import 'package:fcs/pages/main/util.dart'; import 'package:fcs/pages/main/util.dart';
import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/multi_img_controller.dart'; import 'package:fcs/pages/widgets/multi_img_controller.dart';
import 'package:fcs/pages/widgets/multi_img_file.dart'; import 'package:fcs/pages/widgets/multi_img_file.dart';
import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/progress.dart';
@@ -206,7 +207,7 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
decoration: new InputDecoration( decoration: new InputDecoration(
border: InputBorder.none, border: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
labelText: AppTranslations.of(context).text("pickup.date"), labelText: AppTranslations.of(context).text("shipment.date"),
// labelStyle: languageModel.isEng ? labelStyle : labelStyleMM, // labelStyle: languageModel.isEng ? labelStyle : labelStyleMM,
contentPadding: contentPadding:
EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0), EdgeInsets.symmetric(vertical: 10.0, horizontal: 0.0),
@@ -236,7 +237,8 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
backgroundColor: primaryColor, backgroundColor: primaryColor,
title: Text(AppTranslations.of(context).text("pickup.edit.title")), title: LocalText(context, "shipment.edit.title",
fontSize: 18, color: Colors.white),
), ),
body: Card( body: Card(
child: Column( child: Column(

View File

@@ -2,6 +2,7 @@ import 'package:fcs/helpers/theme.dart';
import 'package:fcs/localization/app_translations.dart'; import 'package:fcs/localization/app_translations.dart';
import 'package:fcs/pages/shipment/model/shipment_model.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/bottom_up_page_route.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/progress.dart'; import 'package:fcs/pages/widgets/progress.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@@ -43,7 +44,8 @@ class _ShipmentListState extends State<ShipmentList> {
onPressed: () => Navigator.of(context).pop(), onPressed: () => Navigator.of(context).pop(),
), ),
backgroundColor: primaryColor, backgroundColor: primaryColor,
title: Text(AppTranslations.of(context).text("pickup.title")), title: LocalText(context, "shipment.title",
fontSize: 18, color: Colors.white),
actions: <Widget>[ actions: <Widget>[
IconButton( IconButton(
icon: Icon( icon: Icon(
@@ -70,7 +72,7 @@ class _ShipmentListState extends State<ShipmentList> {
_newPickup(); _newPickup();
}, },
icon: Icon(Icons.add), icon: Icon(Icons.add),
label: Text(AppTranslations.of(context).text("pickup.new")), label: Text(AppTranslations.of(context).text("shipment.new")),
backgroundColor: primaryColor, backgroundColor: primaryColor,
), ),
body: new ListView.separated( body: new ListView.separated(

View File

@@ -1,4 +1,5 @@
import 'package:fcs/helpers/theme.dart'; import 'package:fcs/helpers/theme.dart';
import 'package:fcs/localization/app_translations.dart';
import 'package:fcs/pages/main/model/language_model.dart'; import 'package:fcs/pages/main/model/language_model.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@@ -45,7 +46,8 @@ class DisplayText extends StatelessWidget {
iconData == null iconData == null
? icon == null ? Container() : icon ? icon == null ? Container() : icon
: Padding( : Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.only(
left: .0, right: 15.0, top: 8.0, bottom: 8.0),
child: Icon( child: Icon(
iconData, iconData,
color: primaryColor, color: primaryColor,
@@ -58,7 +60,7 @@ class DisplayText extends StatelessWidget {
labelText == null labelText == null
? Container() ? Container()
: Text( : Text(
labelText, AppTranslations.of(context).text(labelText),
style: labelStyle, style: labelStyle,
), ),
Text( Text(

View File

@@ -0,0 +1,14 @@
import 'package:flutter/material.dart';
class PopupMenu {
int id;
String status;
PopupMenu({this.id, this.status});
}
List<PopupMenu> menuPopup = <PopupMenu>[
PopupMenu(id: 1, status: "Download Commercial Invoice"),
PopupMenu(id: 2, status: "Download Packing List"),
PopupMenu(id: 3, status: "Download DMS"),
PopupMenu(id: 5, status: "Download Cargo Manifest"),
];

View File

@@ -246,6 +246,13 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "3.1.6" version: "3.1.6"
fixnum:
dependency: transitive
description:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "0.10.11"
flutter: flutter:
dependency: "direct main" dependency: "direct main"
description: flutter description: flutter
@@ -539,6 +546,13 @@ packages:
relative: true relative: true
source: path source: path
version: "0.0.1" version: "0.0.1"
protobuf:
dependency: transitive
description:
name: protobuf
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
provider: provider:
dependency: "direct main" dependency: "direct main"
description: description: