merge material 3
This commit is contained in:
@@ -7,10 +7,9 @@ import 'package:fcs/pages/main/model/main_model.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
import 'package:fcs/pages/widgets/input_date.dart';
|
||||
import 'package:fcs/pages/widgets/input_text.dart';
|
||||
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
||||
import 'package:fcs/pages/widgets/local_button.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/progress.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_vector_icons/flutter_vector_icons.dart';
|
||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||
@@ -50,13 +49,15 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
if (widget.shipment != null) {
|
||||
_shipment = widget.shipment!;
|
||||
_shipmentNumberController.text = _shipment.shipmentNumber ?? "";
|
||||
if(_shipment.cutoffDate != null)
|
||||
_cutoffDateController.text = dateFormatter.format(_shipment.cutoffDate!);
|
||||
if(_shipment.arrivalDate != null)
|
||||
_arrivalDateController.text = dateFormatter.format(_shipment.arrivalDate!);
|
||||
if(_shipment.departureDate != null)
|
||||
_departureDateControler.text =
|
||||
dateFormatter.format(_shipment.departureDate!);
|
||||
if (_shipment.cutoffDate != null)
|
||||
_cutoffDateController.text =
|
||||
dateFormatter.format(_shipment.cutoffDate!);
|
||||
if (_shipment.arrivalDate != null)
|
||||
_arrivalDateController.text =
|
||||
dateFormatter.format(_shipment.arrivalDate!);
|
||||
if (_shipment.departureDate != null)
|
||||
_departureDateControler.text =
|
||||
dateFormatter.format(_shipment.departureDate!);
|
||||
_statusController.text = _shipment.status ?? "";
|
||||
_currentShipmentType = _shipment.shipType;
|
||||
_consigneeController.text = _shipment.consignee ?? "";
|
||||
@@ -91,12 +92,12 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
shadowColor: Colors.transparent,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back, color: primaryColor),
|
||||
onPressed: () {
|
||||
appBar: LocalAppBar(
|
||||
labelKey: "FCSshipment.form.title",
|
||||
backgroundColor: Colors.white,
|
||||
labelColor: primaryColor,
|
||||
arrowColor: primaryColor,
|
||||
onBack: () {
|
||||
if (isDataChanged()) {
|
||||
showConfirmDialog(context, "back.button_confirm", () {
|
||||
Navigator.of(context).pop();
|
||||
@@ -104,16 +105,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
} else {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
},
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
title: LocalText(
|
||||
context,
|
||||
"FCSshipment.form.title",
|
||||
color: primaryColor,
|
||||
fontSize: 18,
|
||||
),
|
||||
),
|
||||
}),
|
||||
body: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: ListView(children: <Widget>[
|
||||
@@ -206,7 +198,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
// fcsShipment.departureDate =
|
||||
// depDate == "" ? null : dateFormatter.parse(depDate);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString()); // shold never happen
|
||||
// showMsgDialog(context, "Error", e.toString()); // shold never happen
|
||||
}
|
||||
return fcsShipment;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/fcs_shipment/model/fcs_shipment_model.dart';
|
||||
import 'package:fcs/pages/main/util.dart';
|
||||
import 'package:fcs/pages/widgets/display_text.dart';
|
||||
import 'package:fcs/pages/widgets/local_app_bar.dart';
|
||||
import 'package:fcs/pages/widgets/local_button.dart';
|
||||
import 'package:fcs/pages/widgets/local_text.dart';
|
||||
import 'package:fcs/pages/widgets/pdf_screen.dart';
|
||||
@@ -132,20 +133,11 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
appBar: LocalAppBar(
|
||||
labelKey: "FCSshipment.form.title",
|
||||
backgroundColor: Colors.white,
|
||||
title: LocalText(
|
||||
context,
|
||||
"FCSshipment.form.title",
|
||||
fontSize: 20,
|
||||
color: primaryColor,
|
||||
),
|
||||
labelColor: primaryColor,
|
||||
arrowColor: primaryColor,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.edit, color: primaryColor),
|
||||
@@ -154,7 +146,30 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
menuPopWidget(context)
|
||||
],
|
||||
),
|
||||
// appBar: AppBar(
|
||||
// centerTitle: true,
|
||||
// leading: new IconButton(
|
||||
// icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
|
||||
// onPressed: () => Navigator.of(context).pop(),
|
||||
// ),
|
||||
// shadowColor: Colors.transparent,
|
||||
// backgroundColor: Colors.white,
|
||||
// title: LocalText(
|
||||
// context,
|
||||
// "FCSshipment.form.title",
|
||||
// fontSize: 20,
|
||||
// color: primaryColor,
|
||||
// ),
|
||||
// actions: [
|
||||
// IconButton(
|
||||
// icon: Icon(Icons.edit, color: primaryColor),
|
||||
// onPressed: _edit,
|
||||
// ),
|
||||
// menuPopWidget(context)
|
||||
// ],
|
||||
// ),
|
||||
body: Card(
|
||||
elevation: 0,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
import 'package:fcs/pages/fcs_shipment/model/fcs_shipment_model.dart';
|
||||
import 'package:fcs/pages/widgets/local_app_bar.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';
|
||||
@@ -63,17 +64,8 @@ class _FcsShipmentListState extends State<FcsShipmentList> {
|
||||
return LocalProgress(
|
||||
inAsyncCall: _isLoading,
|
||||
child: Scaffold(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
backgroundColor: primaryColor,
|
||||
title: LocalText(context, 'FCSshipment.list.title',
|
||||
color: Colors.white, fontSize: 20),
|
||||
actions: [popupMenu],
|
||||
),
|
||||
appBar: LocalAppBar(
|
||||
labelKey: "FCSshipment.list.title", actions: [popupMenu]),
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
_newShipment();
|
||||
|
||||
Reference in New Issue
Block a user