update widgets

This commit is contained in:
Sai Naw Wun
2020-10-14 10:33:14 +06:30
parent 8f5542c4fb
commit fa49b6a202
4 changed files with 149 additions and 198 deletions

View File

@@ -500,14 +500,12 @@ class _BoxEditorState extends State<BoxEditor> {
widget.box == null
? Container()
: Center(child: nameWidget(_box.packageNumber)),
Container(
padding: EdgeInsets.only(top: 10),
child: TitleWithAddButton(
SizedBox(
height: 10,
),
TitleWithAddButton(
titleKey: "box.shipment_info",
),
),
Column(
children: [
shipmentBox,
SizedBox(
height: 10,
@@ -519,8 +517,6 @@ class _BoxEditorState extends State<BoxEditor> {
SizedBox(
height: 10,
),
],
),
Divider(),
Container(
padding: EdgeInsets.only(top: 10, left: 10),
@@ -582,15 +578,11 @@ class _BoxEditorState extends State<BoxEditor> {
TitleWithAddButton(
titleKey: "box.dimension",
),
Column(
children: [
shipmentWeightBox,
widthBox,
heightBox,
lengthBox,
SizedBox(height: 25),
],
),
Divider(),
Container(
padding: EdgeInsets.only(left: 10, right: 10),

View File

@@ -18,6 +18,7 @@ import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/input_text.dart';
import 'package:fcs/pages/widgets/local_dropdown.dart';
import 'package:fcs/pages/widgets/local_text.dart';
import 'package:fcs/pages/widgets/local_title.dart';
import 'package:fcs/pages/widgets/multi_img_controller.dart';
import 'package:fcs/pages/widgets/multi_img_file.dart';
import 'package:fcs/pages/widgets/my_data_table.dart';
@@ -196,13 +197,11 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
title: LocalText(context, 'invoice.form.title',
color: primaryColor, fontSize: 20),
),
body: Card(
child: Column(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: ListView(
children: <Widget>[
Expanded(
child: Padding(
padding: const EdgeInsets.all(10.0),
child: ListView(children: <Widget>[
LocalTitle(textKey: "package.create.name"),
DisplayText(
labelTextKey: 'invoice.date',
iconData: Icons.date_range,
@@ -224,8 +223,8 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
)),
IconButton(
icon: Icon(Icons.search, color: primaryColor),
onPressed: () => searchUser(context,
callbackUserSelect: (u) {
onPressed: () =>
searchUser(context, callbackUserSelect: (u) {
setState(() {
this.user = u;
});
@@ -249,29 +248,12 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
iconData: Icons.av_timer,
labelTextKey: 'invoice.status'),
SizedBox(height: 30),
Container(
child: Row(
children: [
Icon(MaterialCommunityIcons.package,
color: primaryColor),
SizedBox(width: 10),
LocalText(
context,
"invoice.box_info",
color: Colors.grey,
fontSize: 20,
fontWeight: FontWeight.w700,
),
],
),
),
Container(
padding: const EdgeInsets.only(top: 15),
child: SingleChildScrollView(
LocalTitle(textKey: "invoice.box_info"),
SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: MyDataTable(
headingRowHeight: 40,
columnSpacing: 20,
// columnSpacing: 20,
columns: [
MyDataColumn(
label: Text(''),
@@ -296,28 +278,9 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
rows: getBoxRow(context),
),
),
),
SizedBox(height: 40),
Container(
child: Row(
children: [
Icon(MaterialCommunityIcons.briefcase_check,
color: primaryColor),
SizedBox(width: 10),
LocalText(
context,
"invoice.cargo_type",
color: Colors.grey,
fontSize: 20,
fontWeight: FontWeight.w700,
),
],
),
),
Container(
padding: const EdgeInsets.only(top: 10),
child: Column(children: getCargoTableByBox(context)),
),
LocalTitle(textKey: "invoice.cargo_type"),
Column(children: getCargoTableByBox(context)),
SizedBox(height: 20),
Container(
padding: EdgeInsets.only(top: 5, left: 18),
@@ -368,9 +331,7 @@ class _InvoiceEditorState extends State<InvoiceEditor> {
Icon(Icons.add, color: primaryColor),
],
)
: Container()
]),
)),
: Container(),
widget.invoice == null
? fcsButton(
context, getLocalString(context, 'invoice.btn_create'))

View File

@@ -71,7 +71,6 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
double l = double.parse(_lengthCtl.text, (s) => 0);
double w = double.parse(_widthCtl.text, (s) => 0);
double h = double.parse(_heightCtl.text, (s) => 0);
print("$l $w $h");
setState(() {
shipmentWeight = l * w * h / volumetricRatio;
});

View File

@@ -239,7 +239,6 @@ class _ShipmentEditorState extends State<ShipmentEditor> {
},
),
),
Column(
children: getBoxList(context, boxModel.boxes),
),