From 88967ba2d48adb0b3362346c225bc333b1959106 Mon Sep 17 00:00:00 2001 From: Thinzar Win Date: Thu, 8 Oct 2020 11:43:53 +0630 Subject: [PATCH] replace fcsInput to InputText --- assets/local/localization_en.json | 2 ++ assets/local/localization_mu.json | 2 ++ lib/pages/shipment/shipment_editor.dart | 28 ++++++++++--------------- lib/pages/shipment/shipment_list.dart | 2 +- 4 files changed, 16 insertions(+), 18 deletions(-) diff --git a/assets/local/localization_en.json b/assets/local/localization_en.json index 9742c09..760f992 100644 --- a/assets/local/localization_en.json +++ b/assets/local/localization_en.json @@ -273,6 +273,8 @@ "shipment.location_time": "Pickup Location / Time", "shipment.information": "Pickup Informations", "shipment.recipient_information": "Recipient Informations", + "shipment.from":"From", + "shipment.to":"To", "Shipment End ================================================================":"", "Rate Start ================================================================":"", diff --git a/assets/local/localization_mu.json b/assets/local/localization_mu.json index 225f02a..3188a33 100644 --- a/assets/local/localization_mu.json +++ b/assets/local/localization_mu.json @@ -273,6 +273,8 @@ "shipment.location_time": "Pickup Location / Time", "shipment.information": "Pickup Informations", "shipment.recipient_information": "Recipient Informations", + "shipment.from":"From", + "shipment.to":"To", "Shipment End ================================================================":"", "Rate Start ================================================================":"", diff --git a/lib/pages/shipment/shipment_editor.dart b/lib/pages/shipment/shipment_editor.dart index 74ef546..df60aae 100644 --- a/lib/pages/shipment/shipment_editor.dart +++ b/lib/pages/shipment/shipment_editor.dart @@ -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/main/util.dart'; import 'package:fcs/pages/widgets/bottom_up_page_route.dart'; +import 'package:fcs/pages/widgets/input_text.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_file.dart'; @@ -105,17 +106,15 @@ class _ShipmentEditorState extends State { Widget build(BuildContext context) { var pickupModel = Provider.of(context); - final fromTimeBox = fcsInput( - 'From', - Icons.timer, - controller: _fromTimeEditingController, - ); + final fromTimeBox = InputText( + labelTextKey: 'shipment.from', + iconData: Icons.timer, + controller: _fromTimeEditingController); - final toTimeBox = fcsInput( - 'To', - null, - controller: _toTimeEditingController, - ); + final toTimeBox = InputText( + labelTextKey: 'shipment.to', + iconData: null, + controller: _toTimeEditingController); final fromTimeBoxReadOnly = fcsInputReadOnly( 'From', @@ -142,6 +141,7 @@ class _ShipmentEditorState extends State { child: Text('-'), ), Container( + padding: EdgeInsets.only(left: 20), child: toTimeBox, width: 120, ), @@ -170,12 +170,6 @@ class _ShipmentEditorState extends State { ), ); - final noOfPackageBox = fcsInput( - 'Number of Packages', - Octicons.package, - controller: _noOfPackageEditingController, - ); - final noOfPackageBoxReadonly = fcsInputReadOnly( 'Number of Packages', Octicons.package, @@ -238,7 +232,7 @@ class _ShipmentEditorState extends State { ), backgroundColor: primaryColor, title: LocalText(context, "shipment.edit.title", - fontSize: 18, color: Colors.white), + fontSize: 18, color: Colors.white), ), body: Card( child: Column( diff --git a/lib/pages/shipment/shipment_list.dart b/lib/pages/shipment/shipment_list.dart index f8f657a..4df16c0 100644 --- a/lib/pages/shipment/shipment_list.dart +++ b/lib/pages/shipment/shipment_list.dart @@ -44,7 +44,7 @@ class _ShipmentListState extends State { onPressed: () => Navigator.of(context).pop(), ), backgroundColor: primaryColor, - title: LocalText(context, "shipment.title", + title: LocalText(context, "shipment", fontSize: 18, color: Colors.white), actions: [ IconButton(