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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user