add length picker

This commit is contained in:
Sai Naw Wun
2020-10-14 01:51:53 +06:30
parent 6ab65065ec
commit 8f5542c4fb
15 changed files with 481 additions and 215 deletions

View File

@@ -77,17 +77,28 @@ class _ReceivingEditorState extends State<ReceivingEditor> {
final trackingIDBox = Container(
padding: EdgeInsets.only(left: 6),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: <Widget>[
Expanded(
child: InputText(
iconData: MaterialCommunityIcons.barcode_scan,
labelTextKey: "receiving.tracking.id",
controller: _trackingIDCtl,
)),
IconButton(
icon: Icon(MaterialCommunityIcons.barcode_scan,
color: primaryColor),
onPressed: _scan,
InkWell(
onTap: _scan,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
children: [
Icon(
MaterialCommunityIcons.barcode_scan,
color: primaryColor,
),
Text("Scan")
],
),
),
),
],
));
@@ -106,11 +117,6 @@ class _ReceivingEditorState extends State<ReceivingEditor> {
labelTextKey: "receiving.name",
iconData: Icons.person,
);
final phoneNumberBox = DisplayText(
text: user != null ? user.phoneNumber : "",
labelTextKey: "receiving.phone",
iconData: Icons.phone,
);
final createButton = fcsButton(
context,
@@ -150,13 +156,12 @@ class _ReceivingEditorState extends State<ReceivingEditor> {
SizedBox(
height: 10,
),
img,
remarkBox,
img,
SizedBox(
height: 10,
),
fcsIDBox,
phoneNumberBox,
namebox,
SizedBox(
height: 20,

View File

@@ -6,6 +6,7 @@ import 'package:fcs/pages/package/model/package_model.dart';
import 'package:fcs/pages/package/package_editor.dart';
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
import 'package:fcs/pages/widgets/display_text.dart';
import 'package:fcs/pages/widgets/fcs_id_icon.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';
@@ -62,6 +63,11 @@ class _ReceivingInfoState extends State<ReceivingInfo> {
labelTextKey: "package.tracking.id",
iconData: MaterialCommunityIcons.barcode_scan,
);
var fcsIDBox = DisplayText(
text: _package.fcsID,
labelTextKey: "processing.fcs.id",
icon: FcsIDIcon(),
);
final customerNameBox = DisplayText(
text: _package.userName,
labelTextKey: "package.create.name",
@@ -116,9 +122,10 @@ class _ReceivingInfoState extends State<ReceivingInfo> {
padding: const EdgeInsets.all(10.0),
child: ListView(children: <Widget>[
trackingIdBox,
_package.userID != null ? customerNameBox : Container(),
_package.photoUrls.length == 0 ? Container() : img,
fcsIDBox,
customerNameBox,
remarkBox,
_package.photoUrls.length == 0 ? Container() : img,
StatusTree(
shipmentHistory: _package.shipmentHistory,
currentStatus: _package.currentStatus),