Merge branch 'master' of tzw/fcs into master
This commit is contained in:
@@ -9,7 +9,7 @@ plugins {
|
||||
}
|
||||
|
||||
def keystoreProperties = new Properties()
|
||||
def keystorePropertiesFile = rootProject.file('key.properties')
|
||||
def keystorePropertiesFile = rootProject.file('dev-key.properties')
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
@@ -99,20 +99,20 @@ class Package {
|
||||
|
||||
return Package(
|
||||
id: docID,
|
||||
userID: map['user_id'],
|
||||
userID: map['user_id'] ?? "",
|
||||
fcsID: map['fcs_id'],
|
||||
trackingID: map['tracking_id'],
|
||||
market: map['market'],
|
||||
market: map['market'] ?? "",
|
||||
userName: map['user_name'] ?? "",
|
||||
phoneNumber: map['phone_number'] ?? "",
|
||||
remark: map['remark'],
|
||||
desc: map['desc'],
|
||||
remark: map['remark'] ?? "",
|
||||
desc: map['desc'] ?? "",
|
||||
status: map['status'],
|
||||
senderFCSID: map['sender_fcs_id'],
|
||||
senderFCSID: map['sender_fcs_id'] ?? "",
|
||||
senderName: map['sender_name'] ?? "",
|
||||
senderPhoneNumber: map['sender_phone_number'] ?? "",
|
||||
fcsShipmentId: map['fcs_shipment_id'],
|
||||
fcsShipmentNumber: map['fcs_shipment_number'],
|
||||
fcsShipmentId: map['fcs_shipment_id'] ?? "",
|
||||
fcsShipmentNumber: map['fcs_shipment_number'] ?? "",
|
||||
deliveryAddress: da,
|
||||
currentStatusDate: currentStatusDate?.toDate().toLocal(),
|
||||
photoUrls: photoUrls,
|
||||
@@ -132,7 +132,7 @@ class Package {
|
||||
'id': id,
|
||||
'fcs_id': fcsID,
|
||||
'sender_fcs_id': senderFCSID,
|
||||
'fcs_shipment_id' : fcsShipmentId,
|
||||
'fcs_shipment_id': fcsShipmentId,
|
||||
'tracking_id': trackingID,
|
||||
'market': market,
|
||||
"desc": desc,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
const primaryColor = const Color(0xff272262);
|
||||
const secondaryColor = const Color(0xffff4400);
|
||||
const thirdColor = const Color(0xf0ff4444);
|
||||
const nextColor = const Color(0xFFfa833d);
|
||||
const buttonColor = const Color(0xFFFFFFFF);
|
||||
const buttonBkColor = const Color(0xFF268944);
|
||||
const labelColor = const Color(0xFF757575);
|
||||
const primaryColor = Color(0xff272262);
|
||||
const secondaryColor = Color(0xffff4400);
|
||||
const thirdColor = Color(0xf0ff4444);
|
||||
const nextColor = Color(0xFFfa833d);
|
||||
const buttonColor = Color(0xFFFFFFFF);
|
||||
const buttonBkColor = Color(0xFF268944);
|
||||
const labelColor = Color(0xFF757575);
|
||||
var dividerColor = Colors.grey.shade400;
|
||||
const dangerColor = const Color(0xffff0606);
|
||||
const dangerColor = Color(0xffff0606);
|
||||
const hintTextColor = Color.fromARGB(255, 187, 187, 187);
|
||||
const linkColor= Color(0xff0000EE);
|
||||
const linkColor = Color(0xff0000EE);
|
||||
const oddColor = Color(0xffECF1F7);
|
||||
|
||||
const TextStyle labelStyle =
|
||||
@@ -21,16 +21,7 @@ const TextStyle labelStyleMM = TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
height: 1,
|
||||
fontFamily: "Myanmar3");
|
||||
const TextStyle subMenuStyle =
|
||||
TextStyle(fontSize: 14, color: Colors.white, fontWeight: FontWeight.w500);
|
||||
const TextStyle subMenuStyleMM = TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontFamily: "Myanmar3");
|
||||
|
||||
const TextStyle welcomeLabelStyle =
|
||||
TextStyle(fontSize: 23, color: primaryColor, fontWeight: FontWeight.w500);
|
||||
const TextStyle welcomeSubLabelStyle =
|
||||
TextStyle(fontSize: 18, color: primaryColor, fontWeight: FontWeight.w500);
|
||||
const TextStyle siginButtonStyle =
|
||||
@@ -42,9 +33,9 @@ TextStyle newLabelStyle(
|
||||
FontWeight? fontWeight,
|
||||
bool underline = false}) {
|
||||
return TextStyle(
|
||||
fontSize: fontSize == null ? 14 : fontSize,
|
||||
color: color == null ? secondaryColor : color,
|
||||
fontWeight: fontWeight == null ? FontWeight.w500 : fontWeight,
|
||||
fontSize: fontSize ?? 14,
|
||||
color: color ?? secondaryColor,
|
||||
fontWeight: fontWeight ?? FontWeight.w500,
|
||||
decoration: underline ? TextDecoration.underline : TextDecoration.none);
|
||||
}
|
||||
|
||||
@@ -54,66 +45,14 @@ TextStyle newLabelStyleMM(
|
||||
FontWeight? fontWeight,
|
||||
bool underline = false}) {
|
||||
return TextStyle(
|
||||
fontSize: fontSize == null ? 13 : fontSize,
|
||||
color: color == null ? secondaryColor : color,
|
||||
fontWeight: fontWeight == null ? FontWeight.w500 : fontWeight,
|
||||
fontSize: fontSize ?? 13,
|
||||
color: color ?? secondaryColor,
|
||||
fontWeight: fontWeight ?? FontWeight.w500,
|
||||
decoration: underline ? TextDecoration.underline : TextDecoration.none,
|
||||
fontFamily: "Myanmar3");
|
||||
}
|
||||
|
||||
const TextStyle photoLabelStyle =
|
||||
TextStyle(color: Colors.black, fontSize: 13.0);
|
||||
const TextStyle photoLabelStyleMM =
|
||||
TextStyle(color: Colors.black, fontSize: 13.0, fontFamily: "Myanmar3");
|
||||
const TextStyle textStyle =
|
||||
TextStyle(fontSize: 14, color: Colors.black87, fontWeight: FontWeight.w500);
|
||||
const TextStyle textStyleOdd = TextStyle(
|
||||
fontSize: 15, color: Colors.blueAccent, fontWeight: FontWeight.w500);
|
||||
const TextStyle textStrikeStyle = TextStyle(
|
||||
fontSize: 15,
|
||||
color: Colors.black87,
|
||||
fontWeight: FontWeight.w500,
|
||||
decoration: TextDecoration.lineThrough,
|
||||
);
|
||||
const TextStyle textHighlightRedStyle = TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
backgroundColor: Colors.red,
|
||||
);
|
||||
const TextStyle textHighlightGreenStyle = TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
backgroundColor: Colors.green,
|
||||
);
|
||||
const TextStyle textHighlightBlueStyle = TextStyle(
|
||||
fontSize: 18,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500,
|
||||
backgroundColor: Colors.blue,
|
||||
);
|
||||
const TextStyle textStyle = TextStyle(fontSize: 14, color: Colors.black);
|
||||
|
||||
const TextStyle subTitleStyle =
|
||||
TextStyle(fontSize: 12, color: Colors.black45, fontWeight: FontWeight.w500);
|
||||
|
||||
final BoxDecoration tableRowOdd = BoxDecoration(
|
||||
color: Color(0x1F000000),
|
||||
);
|
||||
final BoxDecoration tableRowEven = BoxDecoration(
|
||||
color: Colors.white54,
|
||||
);
|
||||
|
||||
class LoginColors {
|
||||
const LoginColors();
|
||||
|
||||
static const Color loginGradientStart = const Color(0xfff00a21);
|
||||
static const Color loginGradientEnd = const Color(0xfff00a21);
|
||||
|
||||
static const primaryGradient = const LinearGradient(
|
||||
colors: const [loginGradientStart, loginGradientEnd],
|
||||
stops: const [0.0, 1.0],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ class _CartonSizeWidgetState extends State<CartonSizeWidget> {
|
||||
isDense: true,
|
||||
value: _selectStandardSize,
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
underline: Container(height: 1, color: Colors.grey),
|
||||
underline: Container(height: 1, color: isStandardSize? primaryColor: Colors.grey),
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
if (newValue?.name == MANAGE_CARTONSIZE) {
|
||||
|
||||
@@ -451,8 +451,11 @@ class CartonSubmit extends StatelessWidget {
|
||||
// packages.isNotEmpty ? packagesBox : const SizedBox(),
|
||||
// const SizedBox(height: 10),
|
||||
cargoTypes.isNotEmpty ? cargosBox : const SizedBox(),
|
||||
const SizedBox(height: 10),
|
||||
surchareItems.isNotEmpty ? surChargeItemsBox : const SizedBox(),
|
||||
surchareItems.isNotEmpty
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: surChargeItemsBox)
|
||||
: const SizedBox(),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:provider/provider.dart';
|
||||
|
||||
import '../../../domain/entities/carton.dart';
|
||||
import '../../../helpers/theme.dart';
|
||||
import '../../main/util.dart';
|
||||
import '../model/carton_selection_model.dart';
|
||||
|
||||
typedef OnAction = Future<void> Function();
|
||||
@@ -72,20 +73,20 @@ class CartonSelectionResult extends StatelessWidget {
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Expanded(
|
||||
child: new Padding(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
vertical: 8.0),
|
||||
child: new Column(
|
||||
child: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
new Text(carton.cartonNumber ?? "",
|
||||
style: new TextStyle(
|
||||
Text(carton.cartonNumber ?? "",
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
color: Colors.black)),
|
||||
new Text(
|
||||
"${carton.cartonWeight.toStringAsFixed(2)} lb",
|
||||
style: new TextStyle(
|
||||
Text(
|
||||
"${twoDecimalFormatted(carton.cartonWeight)} lb",
|
||||
style: TextStyle(
|
||||
fontSize: 15.0,
|
||||
color: Colors.grey),
|
||||
),
|
||||
|
||||
@@ -29,7 +29,7 @@ class MixCartonSubmit extends StatefulWidget {
|
||||
final OnCreateMixCarton? onCreate;
|
||||
final OnPrevious? onPrevious;
|
||||
const MixCartonSubmit(
|
||||
{Key? key,
|
||||
{super.key,
|
||||
this.onCreate,
|
||||
this.onPrevious,
|
||||
required this.shipment,
|
||||
@@ -39,8 +39,7 @@ class MixCartonSubmit extends StatefulWidget {
|
||||
this.length = 0,
|
||||
this.width = 0,
|
||||
this.height = 0,
|
||||
this.isNew = true})
|
||||
: super(key: key);
|
||||
this.isNew = true});
|
||||
|
||||
@override
|
||||
State<MixCartonSubmit> createState() => _MixCartonSubmitState();
|
||||
@@ -48,8 +47,8 @@ class MixCartonSubmit extends StatefulWidget {
|
||||
|
||||
class _MixCartonSubmitState extends State<MixCartonSubmit> {
|
||||
final NumberFormat numberFormatter = NumberFormat("#,###");
|
||||
Map<String?, double> _mapCargos = {};
|
||||
Map<String?, double> _mapSurchargeItems = {};
|
||||
final Map<String?, double> _mapCargos = {};
|
||||
final Map<String?, double> _mapSurchargeItems = {};
|
||||
double totalWeight = 0;
|
||||
|
||||
@override
|
||||
@@ -60,15 +59,15 @@ class _MixCartonSubmitState extends State<MixCartonSubmit> {
|
||||
|
||||
_init() {
|
||||
// get cargos by weight
|
||||
List<CargoType> _cargoTypes = [];
|
||||
List<CargoType> cargoTypes = [];
|
||||
for (var c in widget.cartons) {
|
||||
_cargoTypes.addAll(c.cargoTypes);
|
||||
cargoTypes.addAll(c.cargoTypes);
|
||||
}
|
||||
|
||||
_cargoTypes.sort((a, b) => a.name!.compareTo(b.name!));
|
||||
cargoTypes.sort((a, b) => a.name!.compareTo(b.name!));
|
||||
|
||||
Map<String?, List<CargoType>> _cargosByWeight = groupCargos(_cargoTypes);
|
||||
_cargosByWeight.forEach((key, value) {
|
||||
Map<String?, List<CargoType>> cargosByWeight = groupCargos(cargoTypes);
|
||||
cargosByWeight.forEach((key, value) {
|
||||
double total = value.fold(0, (sum, item) => sum + item.weight);
|
||||
_mapCargos[key] = total;
|
||||
});
|
||||
@@ -77,17 +76,17 @@ class _MixCartonSubmitState extends State<MixCartonSubmit> {
|
||||
|
||||
// get surcharge items
|
||||
|
||||
List<CargoType> _surchargeItems = [];
|
||||
List<CargoType> surchargeItems = [];
|
||||
for (var c in widget.cartons) {
|
||||
_surchargeItems.addAll(c.surchareItems);
|
||||
surchargeItems.addAll(c.surchareItems);
|
||||
}
|
||||
|
||||
_surchargeItems.sort((a, b) => a.name!.compareTo(b.name!));
|
||||
surchargeItems.sort((a, b) => a.name!.compareTo(b.name!));
|
||||
|
||||
Map<String?, List<CargoType>> _cargosByCustomDutyFee =
|
||||
groupCargos(_surchargeItems);
|
||||
Map<String?, List<CargoType>> cargosByCustomDutyFee =
|
||||
groupCargos(surchargeItems);
|
||||
|
||||
_cargosByCustomDutyFee.forEach((key, value) {
|
||||
cargosByCustomDutyFee.forEach((key, value) {
|
||||
double total = value.fold(0, (sum, item) => sum + item.qty);
|
||||
_mapSurchargeItems[key] = total;
|
||||
});
|
||||
@@ -99,8 +98,8 @@ class _MixCartonSubmitState extends State<MixCartonSubmit> {
|
||||
|
||||
Map<String?, List<CargoType>> groupCargos(List<CargoType> cargos) {
|
||||
var groups = groupBy(cargos, (CargoType e) {
|
||||
String? _categoryName = e.name;
|
||||
return _categoryName;
|
||||
String? categoryName = e.name;
|
||||
return categoryName;
|
||||
});
|
||||
|
||||
return groups;
|
||||
@@ -220,22 +219,80 @@ class _MixCartonSubmitState extends State<MixCartonSubmit> {
|
||||
),
|
||||
);
|
||||
}).toList()),
|
||||
const SizedBox(height: 10),
|
||||
// const SizedBox(height: 10),
|
||||
// Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: _mapSurchargeItems.entries.map((e) {
|
||||
// return Padding(
|
||||
// padding: const EdgeInsets.symmetric(vertical: 3),
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
// children: [
|
||||
// Text(
|
||||
// e.key ?? "",
|
||||
// style: TextStyle(color: labelColor, fontSize: 15),
|
||||
// ),
|
||||
// Text("${numberFormatter.format(e.value)} pc",
|
||||
// style:
|
||||
// TextStyle(color: labelColor, fontSize: 15))
|
||||
// ],
|
||||
// ),
|
||||
// );
|
||||
// }).toList()),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
]),
|
||||
);
|
||||
|
||||
final surChargeItemsBox = Padding(
|
||||
padding: const EdgeInsets.only(top: 10),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 5, bottom: 5, right: 8),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
LocalText(context, 'box.input_surcharge_item',
|
||||
color: primaryColor,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.normal),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(color: primaryColor),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: _mapSurchargeItems.entries.map((e) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 3),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
e.key ?? "",
|
||||
style: TextStyle(color: labelColor, fontSize: 15),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
e.key ?? "",
|
||||
style: TextStyle(
|
||||
color: Colors.black, fontSize: 15),
|
||||
),
|
||||
Text(
|
||||
"${removeTrailingZeros((e.value).toDouble())} pc",
|
||||
textAlign: TextAlign.end,
|
||||
style: TextStyle(
|
||||
color: Colors.black, fontSize: 15))
|
||||
],
|
||||
),
|
||||
Text("${numberFormatter.format(e.value)} pc",
|
||||
style:
|
||||
TextStyle(color: labelColor, fontSize: 15))
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -302,7 +359,12 @@ class _MixCartonSubmitState extends State<MixCartonSubmit> {
|
||||
const SizedBox(height: 10),
|
||||
widget.cartons.isNotEmpty ? cartonsBox : const SizedBox(),
|
||||
const SizedBox(height: 10),
|
||||
cargosBox,
|
||||
_mapCargos.isNotEmpty ? cargosBox : const SizedBox(),
|
||||
_mapSurchargeItems.isNotEmpty
|
||||
? Padding(
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: surChargeItemsBox)
|
||||
: const SizedBox(),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -172,7 +172,8 @@ class _TypeWidgetState extends State<TypeWidget> {
|
||||
isDense: true,
|
||||
value: _selectStandardSize,
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
underline: Container(height: 1, color: Colors.grey),
|
||||
underline: Container(
|
||||
height: 1, color: isStandardSize ? primaryColor : Colors.grey),
|
||||
onChanged: (newValue) {
|
||||
setState(() {
|
||||
if (newValue?.name == MANAGE_CARTONSIZE) {
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
@@ -13,21 +15,21 @@ import 'package:provider/provider.dart';
|
||||
class DeliveryAddressEditor extends StatefulWidget {
|
||||
final DeliveryAddress? deliveryAddress;
|
||||
final User? user;
|
||||
DeliveryAddressEditor({this.deliveryAddress, this.user});
|
||||
const DeliveryAddressEditor({super.key, this.deliveryAddress, this.user});
|
||||
|
||||
@override
|
||||
_DeliveryAddressEditorState createState() => _DeliveryAddressEditorState();
|
||||
}
|
||||
|
||||
class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
||||
TextEditingController _nameController = new TextEditingController();
|
||||
TextEditingController _address1Controller = new TextEditingController();
|
||||
TextEditingController _address2Controller = new TextEditingController();
|
||||
TextEditingController _cityController = new TextEditingController();
|
||||
TextEditingController _stateController = new TextEditingController();
|
||||
TextEditingController _phoneController = new TextEditingController();
|
||||
final TextEditingController _nameController = TextEditingController();
|
||||
final TextEditingController _address1Controller = TextEditingController();
|
||||
final TextEditingController _address2Controller = TextEditingController();
|
||||
final TextEditingController _cityController = TextEditingController();
|
||||
final TextEditingController _stateController = TextEditingController();
|
||||
final TextEditingController _phoneController = TextEditingController();
|
||||
|
||||
DeliveryAddress _deliveryAddress = new DeliveryAddress();
|
||||
DeliveryAddress _deliveryAddress = DeliveryAddress();
|
||||
|
||||
bool _isLoading = false;
|
||||
bool _isNew = true;
|
||||
@@ -180,9 +182,9 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
||||
cityBox,
|
||||
SizedBox(height: 5),
|
||||
regionBox,
|
||||
SizedBox(height: 5),
|
||||
SizedBox(height: 20),
|
||||
_isNew ? createBtn : updateBtn,
|
||||
SizedBox(height: 10)
|
||||
SizedBox(height: 20)
|
||||
]),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -15,17 +15,17 @@ import 'package:provider/provider.dart';
|
||||
class DiscountEditor extends StatefulWidget {
|
||||
final Discount? discount;
|
||||
|
||||
const DiscountEditor({Key? key, this.discount}) : super(key: key);
|
||||
const DiscountEditor({super.key, this.discount});
|
||||
@override
|
||||
_DiscountEditorState createState() => _DiscountEditorState();
|
||||
}
|
||||
|
||||
class _DiscountEditorState extends State<DiscountEditor> {
|
||||
bool _isLoading = false;
|
||||
Discount _discount = new Discount();
|
||||
TextEditingController _codeController = new TextEditingController();
|
||||
TextEditingController _amountController = new TextEditingController();
|
||||
TextEditingController _statusController = new TextEditingController();
|
||||
Discount _discount = Discount();
|
||||
final TextEditingController _codeController = TextEditingController();
|
||||
final TextEditingController _amountController = TextEditingController();
|
||||
final TextEditingController _statusController = TextEditingController();
|
||||
|
||||
bool _isNew = false;
|
||||
String customerName = '';
|
||||
@@ -51,7 +51,7 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
||||
Widget build(BuildContext context) {
|
||||
final codeBox = InputText(
|
||||
labelTextKey: 'discount.code',
|
||||
iconData: FontAwesomeIcons.algolia,
|
||||
iconData: Ionicons.code_slash,
|
||||
controller: _codeController,
|
||||
autovalidateMode: AutovalidateMode.onUserInteraction,
|
||||
validator: (value) {
|
||||
@@ -128,13 +128,12 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
||||
children: <Widget>[
|
||||
codeBox,
|
||||
amountBox,
|
||||
SizedBox(height: 7),
|
||||
SizedBox(height: 15),
|
||||
customerBox,
|
||||
SizedBox(height: 7),
|
||||
widget.discount == null
|
||||
? Container()
|
||||
: Container(
|
||||
padding: EdgeInsets.only(top: 5),
|
||||
padding: EdgeInsets.only(top: 10),
|
||||
child: statusBox,
|
||||
),
|
||||
],
|
||||
|
||||
@@ -64,7 +64,7 @@ class _DiscountListState extends State<DiscountList> {
|
||||
Expanded(
|
||||
child: ListView.separated(
|
||||
separatorBuilder: (context, index) =>
|
||||
Divider(color: Colors.black, height: 1),
|
||||
Divider(color: dividerColor, height: 1),
|
||||
controller: _controller,
|
||||
itemCount: discountModel.discounts.length,
|
||||
itemBuilder: (BuildContext context, int index) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import '../main/util.dart';
|
||||
|
||||
class FcsShipmentEditor extends StatefulWidget {
|
||||
final FcsShipment? shipment;
|
||||
FcsShipmentEditor({this.shipment});
|
||||
const FcsShipmentEditor({super.key, this.shipment});
|
||||
|
||||
@override
|
||||
_FcsShipmentEditorState createState() => _FcsShipmentEditorState();
|
||||
@@ -29,14 +29,14 @@ class FcsShipmentEditor extends StatefulWidget {
|
||||
|
||||
class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
var dateFormatter = new DateFormat('dd MMM yyyy');
|
||||
TextEditingController _shipmentNumberController = new TextEditingController();
|
||||
TextEditingController _cutoffDateController = new TextEditingController();
|
||||
TextEditingController _etaDateController = new TextEditingController();
|
||||
var dateFormatter = DateFormat('dd MMM yyyy');
|
||||
final _shipmentNumberController = TextEditingController();
|
||||
final _cutoffDateController = TextEditingController();
|
||||
final _etaDateController = TextEditingController();
|
||||
|
||||
TextEditingController _statusController = new TextEditingController();
|
||||
final _statusController = TextEditingController();
|
||||
|
||||
FcsShipment _shipment = new FcsShipment();
|
||||
FcsShipment _shipment = FcsShipment();
|
||||
bool _isLoading = false;
|
||||
ShipmentType? _currentShipmentType;
|
||||
ShipmentConsignee? _currentConsignee;
|
||||
@@ -52,11 +52,13 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
if (widget.shipment != null) {
|
||||
_shipment = widget.shipment!;
|
||||
_shipmentNumberController.text = _shipment.shipmentNumber ?? "";
|
||||
if (_shipment.cutoffDate != null)
|
||||
if (_shipment.cutoffDate != null) {
|
||||
_cutoffDateController.text =
|
||||
dateFormatter.format(_shipment.cutoffDate!);
|
||||
if (_shipment.etaDate != null)
|
||||
}
|
||||
if (_shipment.etaDate != null) {
|
||||
_etaDateController.text = dateFormatter.format(_shipment.etaDate!);
|
||||
}
|
||||
|
||||
_statusController.text = _shipment.status ?? "";
|
||||
|
||||
@@ -111,6 +113,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
|
||||
final shipmentTypeBox = DropdownButtonFormField(
|
||||
value: _currentShipmentType == "" ? null : _currentShipmentType,
|
||||
style: TextStyle(fontSize: 14, color: Colors.black),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
enabledBorder:
|
||||
@@ -125,7 +128,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
AppTranslations.of(context)!.text('FCSshipment.shipment_type'),
|
||||
icon: Icon(Ionicons.ios_airplane, color: primaryColor)),
|
||||
items: shipmentTypes
|
||||
.map((e) => DropdownMenuItem(child: Text(e.name), value: e))
|
||||
.map((e) => DropdownMenuItem(value: e, child: Text(e.name)))
|
||||
.toList(),
|
||||
onChanged: (selected) => {
|
||||
setState(() {
|
||||
@@ -136,6 +139,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
|
||||
final consigneeBox = DropdownButtonFormField(
|
||||
value: _currentConsignee == "" ? null : _currentConsignee,
|
||||
style: TextStyle(fontSize: 14, color: Colors.black),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
enabledBorder:
|
||||
@@ -160,6 +164,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
|
||||
final loadingPortBox = DropdownButtonFormField(
|
||||
value: _currentLoadingPort == "" ? null : _currentLoadingPort,
|
||||
style: TextStyle(fontSize: 14, color: Colors.black),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
enabledBorder:
|
||||
@@ -185,6 +190,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
|
||||
final destinationBox = DropdownButtonFormField(
|
||||
value: _currentDestination == "" ? null : _currentDestination,
|
||||
style: TextStyle(fontSize: 14, color: Colors.black),
|
||||
decoration: InputDecoration(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
enabledBorder:
|
||||
@@ -293,7 +299,7 @@ class _FcsShipmentEditorState extends State<FcsShipmentEditor> {
|
||||
destinationBox,
|
||||
SizedBox(height: 30),
|
||||
_isNew ? createBtn : updateBtn,
|
||||
SizedBox(height: 15)
|
||||
SizedBox(height: 30)
|
||||
]),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:fcs/constants.dart';
|
||||
import 'package:fcs/domain/entities/fcs_shipment.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
@@ -248,6 +250,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
padding: const EdgeInsets.only(left: 12.0, right: 12),
|
||||
child: ListView(children: <Widget>[
|
||||
statusBox,
|
||||
const SizedBox(height: 5),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.end, children: [
|
||||
Expanded(
|
||||
child: cutoffDateDBox,
|
||||
@@ -255,6 +258,7 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
),
|
||||
Flexible(child: etaBox),
|
||||
]),
|
||||
const SizedBox(height: 5),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@@ -264,9 +268,13 @@ class _FcsShipmentInfoState extends State<FcsShipmentInfo> {
|
||||
Flexible(child: packageBox)
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
shipTypeBox,
|
||||
const SizedBox(height: 5),
|
||||
consigneeBox,
|
||||
const SizedBox(height: 5),
|
||||
portBox,
|
||||
const SizedBox(height: 5),
|
||||
destinationBox,
|
||||
const SizedBox(height: 30),
|
||||
_fcsShipment.status == fcs_shipment_pending_status
|
||||
|
||||
@@ -107,8 +107,8 @@ class _HomePageState extends State<HomePage> {
|
||||
}
|
||||
|
||||
_startNotiTimer() async {
|
||||
var _duration = new Duration(milliseconds: 500);
|
||||
new Timer.periodic(_duration, (t) => displayNoti(t));
|
||||
var _duration = Duration(milliseconds: 500);
|
||||
Timer.periodic(_duration, (t) => displayNoti(t));
|
||||
}
|
||||
|
||||
void displayNoti(Timer timer) async {
|
||||
@@ -388,15 +388,15 @@ class _HomePageState extends State<HomePage> {
|
||||
final fcsToggle = ToggleButtons(
|
||||
selectedColor: Colors.white,
|
||||
color: Colors.blue,
|
||||
children: <Widget>[
|
||||
Icon(MaterialCommunityIcons.account_tie, size: 25),
|
||||
],
|
||||
onPressed: (i) => this.setState(() {
|
||||
onPressed: (i) => setState(() {
|
||||
isFcs[0] = !isFcs[0];
|
||||
SharedPref.saveStaffMode(isFcs[0]);
|
||||
}),
|
||||
isSelected: isFcs,
|
||||
selectedBorderColor: Colors.white24,
|
||||
children: <Widget>[
|
||||
Icon(MaterialCommunityIcons.account_tie, size: 25),
|
||||
],
|
||||
);
|
||||
|
||||
final signinBtn = TextButton(
|
||||
@@ -459,64 +459,60 @@ class _HomePageState extends State<HomePage> {
|
||||
),
|
||||
);
|
||||
|
||||
var searchInput = Row(children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 3, left: 5, right: 5, top: 3),
|
||||
child: Theme(
|
||||
data: new ThemeData(
|
||||
primaryColor: primaryColor,
|
||||
primaryColorDark: primaryColor,
|
||||
),
|
||||
child: TextField(
|
||||
style: TextStyle(color: Colors.white),
|
||||
controller: _searchCtl,
|
||||
scrollPadding: EdgeInsets.all(0),
|
||||
decoration: new InputDecoration(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide:
|
||||
const BorderSide(color: Colors.white, width: 1.5),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide:
|
||||
const BorderSide(color: Colors.white, width: 1.5),
|
||||
),
|
||||
contentPadding: EdgeInsets.only(top: 1, bottom: 1),
|
||||
isDense: true,
|
||||
hintText: getLocalString(context, "home.search"),
|
||||
hintStyle: languageModel.isEng
|
||||
? newLabelStyle(color: Colors.white60)
|
||||
: newLabelStyleMM(color: Colors.white60),
|
||||
prefixIcon: const Icon(
|
||||
Icons.search,
|
||||
color: Colors.grey,
|
||||
),
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => {_searchCtl.clear()},
|
||||
child: const Icon(
|
||||
Icons.close,
|
||||
color: Colors.grey,
|
||||
var searchInput = Padding(
|
||||
padding: const EdgeInsets.only(left: 5, right: 5, bottom: 10, top: 5),
|
||||
child: Row(children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(),
|
||||
child: Theme(
|
||||
data: ThemeData(
|
||||
primaryColor: primaryColor,
|
||||
primaryColorDark: primaryColor,
|
||||
),
|
||||
child: TextField(
|
||||
style: TextStyle(color: Colors.white),
|
||||
controller: _searchCtl,
|
||||
scrollPadding: EdgeInsets.all(0),
|
||||
cursorColor: Colors.white,
|
||||
decoration: InputDecoration(
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide: BorderSide(color: Colors.white60, width: 1.5),
|
||||
),
|
||||
),
|
||||
suffixStyle: const TextStyle(color: primaryColor)),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(30)),
|
||||
borderSide: BorderSide(color: Colors.white60, width: 1.5),
|
||||
),
|
||||
contentPadding: EdgeInsets.only(top: 1, bottom: 1),
|
||||
isDense: true,
|
||||
hintText: getLocalString(context, "home.search"),
|
||||
hintStyle: languageModel.isEng
|
||||
? newLabelStyle(color: Colors.grey)
|
||||
: newLabelStyleMM(color: Colors.grey),
|
||||
prefixIcon: const Icon(Icons.search, color: Colors.grey),
|
||||
suffixIcon: InkWell(
|
||||
onTap: () => {_searchCtl.clear()},
|
||||
child: const Icon(Icons.close, color: Colors.grey),
|
||||
),
|
||||
suffixStyle: const TextStyle(color: primaryColor)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: LocalText(
|
||||
context,
|
||||
"home.search.btn",
|
||||
color: Colors.white,
|
||||
InkWell(
|
||||
onTap: _lookup,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(10.0),
|
||||
child: LocalText(
|
||||
context,
|
||||
"home.search.btn",
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
),
|
||||
onTap: _lookup,
|
||||
)
|
||||
]);
|
||||
)
|
||||
]),
|
||||
);
|
||||
widgets.insert(0, searchInput);
|
||||
|
||||
return LocalProgress(
|
||||
@@ -528,8 +524,8 @@ class _HomePageState extends State<HomePage> {
|
||||
elevation: 0,
|
||||
backgroundColor: primaryColor,
|
||||
title: ClipRRect(
|
||||
borderRadius: BorderRadius.circular(30.0),
|
||||
child: Image.asset("assets/logo.jpg", height: 40),
|
||||
borderRadius: new BorderRadius.circular(30.0),
|
||||
),
|
||||
actions: login
|
||||
? user.isCustomer()
|
||||
@@ -557,6 +553,7 @@ class _HomePageState extends State<HomePage> {
|
||||
),
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
const SizedBox(height: 10),
|
||||
Column(children: [
|
||||
Wrap(
|
||||
alignment: WrapAlignment.center,
|
||||
|
||||
@@ -147,19 +147,15 @@ class _PackageEditorState extends State<PackageEditor> {
|
||||
),
|
||||
img,
|
||||
Divider(),
|
||||
SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
SizedBox(height: 15),
|
||||
marketDropdown(),
|
||||
SizedBox(height: 5),
|
||||
descBox,
|
||||
SizedBox(height: 5),
|
||||
remarkBox,
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
selectBtn,
|
||||
SizedBox(
|
||||
height: 20,
|
||||
)
|
||||
SizedBox(height: 20)
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -179,7 +175,7 @@ class _PackageEditorState extends State<PackageEditor> {
|
||||
return Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 0, right: 10),
|
||||
padding: const EdgeInsets.only(right: 15),
|
||||
child: Icon(Icons.store, color: primaryColor),
|
||||
),
|
||||
Expanded(
|
||||
@@ -199,10 +195,7 @@ class _PackageEditorState extends State<PackageEditor> {
|
||||
isDense: true,
|
||||
value: selectedMarket,
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
underline: Container(
|
||||
height: 1,
|
||||
color: Colors.grey,
|
||||
),
|
||||
underline: Container(height: 1, color: primaryColor),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
if (newValue == MANAGE_MARKET) {
|
||||
@@ -222,7 +215,7 @@ class _PackageEditorState extends State<PackageEditor> {
|
||||
style: TextStyle(
|
||||
color: value == MANAGE_MARKET
|
||||
? secondaryColor
|
||||
: primaryColor)),
|
||||
: Colors.black)),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
|
||||
@@ -36,8 +36,8 @@ class ProcessingEditEditor extends StatefulWidget {
|
||||
class _ProcessingEditEditorState extends State<ProcessingEditEditor> {
|
||||
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
||||
|
||||
TextEditingController _remarkCtl = TextEditingController();
|
||||
TextEditingController _descCtl = TextEditingController();
|
||||
final TextEditingController _remarkCtl = TextEditingController();
|
||||
final TextEditingController _descCtl = TextEditingController();
|
||||
|
||||
Package? _package;
|
||||
User? _consignee;
|
||||
@@ -72,9 +72,10 @@ class _ProcessingEditEditorState extends State<ProcessingEditEditor> {
|
||||
var fcsShipments =
|
||||
await context.read<FcsShipmentModel>().getActiveFcsShipments();
|
||||
_shipments = fcsShipments;
|
||||
|
||||
|
||||
var s = FcsShipment(
|
||||
id: widget.package.fcsShipmentId, shipmentNumber: widget.package.fcsShipmentNumber);
|
||||
id: widget.package.fcsShipmentId,
|
||||
shipmentNumber: widget.package.fcsShipmentNumber);
|
||||
|
||||
if (_shipments.contains(s)) {
|
||||
_shipment = s;
|
||||
@@ -183,10 +184,13 @@ class _ProcessingEditEditorState extends State<ProcessingEditEditor> {
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
fcsShipmentsBox,
|
||||
SizedBox(height: 10),
|
||||
marketDropdown(),
|
||||
SizedBox(height: 5),
|
||||
descBox,
|
||||
SizedBox(height: 5),
|
||||
remarkBox,
|
||||
const SizedBox(height: 10),
|
||||
const SizedBox(height: 15),
|
||||
img,
|
||||
SizedBox(height: 20),
|
||||
completeProcessingBtn,
|
||||
@@ -207,63 +211,57 @@ class _ProcessingEditEditorState extends State<ProcessingEditEditor> {
|
||||
markets.insert(0, selectedMarket);
|
||||
}
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.only(left: 5.0, right: 0, top: 10),
|
||||
child: Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 0, right: 10),
|
||||
child: Icon(Icons.store, color: primaryColor),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 18.0),
|
||||
child: LocalText(
|
||||
context,
|
||||
"processing.market",
|
||||
color: Colors.black54,
|
||||
fontSize: 16,
|
||||
),
|
||||
return Row(
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(left: 0, right: 15),
|
||||
child: Icon(Icons.store, color: primaryColor),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 18.0),
|
||||
child: LocalText(
|
||||
context,
|
||||
"processing.market",
|
||||
color: Colors.black54,
|
||||
fontSize: 16,
|
||||
),
|
||||
DropdownButton<String>(
|
||||
isDense: true,
|
||||
value: selectedMarket,
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
underline: Container(
|
||||
height: 1,
|
||||
color: Colors.grey,
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
if (newValue == MANAGE_MARKET) {
|
||||
selectedMarket = null;
|
||||
_manageMarket();
|
||||
return;
|
||||
}
|
||||
selectedMarket = newValue;
|
||||
});
|
||||
},
|
||||
isExpanded: true,
|
||||
items: markets.map<DropdownMenuItem<String>>((String? value) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(value ?? "",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: value == MANAGE_MARKET
|
||||
? secondaryColor
|
||||
: primaryColor)),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
DropdownButton<String>(
|
||||
isDense: true,
|
||||
value: selectedMarket,
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
underline: Container(height: 1, color: primaryColor),
|
||||
onChanged: (String? newValue) {
|
||||
setState(() {
|
||||
if (newValue == MANAGE_MARKET) {
|
||||
selectedMarket = null;
|
||||
_manageMarket();
|
||||
return;
|
||||
}
|
||||
selectedMarket = newValue;
|
||||
});
|
||||
},
|
||||
isExpanded: true,
|
||||
items: markets.map<DropdownMenuItem<String>>((String? value) {
|
||||
return DropdownMenuItem<String>(
|
||||
value: value,
|
||||
child: Text(value ?? "",
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: value == MANAGE_MARKET
|
||||
? secondaryColor
|
||||
: Colors.black)),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@@ -293,7 +291,7 @@ class _ProcessingEditEditorState extends State<ProcessingEditEditor> {
|
||||
_package!.fcsShipmentId = _shipment?.id;
|
||||
await packageModel.updateProcessing(_package!,
|
||||
multiImgController.getAddedFile, multiImgController.getDeletedUrl);
|
||||
Navigator.pop(context,true);
|
||||
Navigator.pop(context, true);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
} finally {
|
||||
@@ -311,7 +309,7 @@ class _ProcessingEditEditorState extends State<ProcessingEditEditor> {
|
||||
desc: _descCtl.text,
|
||||
remark: _remarkCtl.text,
|
||||
photoUrls: widget.package.photoUrls,
|
||||
fcsShipmentId: _shipment?.id);
|
||||
fcsShipmentId: _shipment?.id ?? "");
|
||||
return widget.package.isChangedForEditProcessing(package) ||
|
||||
multiImgController.getAddedFile.isNotEmpty ||
|
||||
multiImgController.getDeletedUrl.isNotEmpty;
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:fcs/domain/entities/package.dart';
|
||||
import 'package:fcs/domain/entities/user.dart';
|
||||
import 'package:fcs/helpers/theme.dart';
|
||||
@@ -27,9 +29,9 @@ class _ReceivingEditorState extends State<ReceivingEditor> {
|
||||
late bool _isNew;
|
||||
User? _consignee;
|
||||
final _receiveFormKey = GlobalKey<FormState>();
|
||||
TextEditingController _trackingIDCtl = new TextEditingController();
|
||||
TextEditingController _remarkCtl = new TextEditingController();
|
||||
MultiImgController _multiImgController = MultiImgController();
|
||||
final _trackingIDCtl = TextEditingController();
|
||||
final _remarkCtl = TextEditingController();
|
||||
final _multiImgController = MultiImgController();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -156,9 +158,7 @@ class _ReceivingEditorState extends State<ReceivingEditor> {
|
||||
child: ListView(
|
||||
children: <Widget>[
|
||||
trackingIDBox,
|
||||
SizedBox(
|
||||
height: 10,
|
||||
),
|
||||
SizedBox(height: 5),
|
||||
remarkBox,
|
||||
Divider(),
|
||||
img,
|
||||
|
||||
@@ -112,6 +112,11 @@ class _SmsCodePageState extends State<SmsCodePage> {
|
||||
padding: EdgeInsets.only(top: 20, left: 20, right: 20),
|
||||
child: PinInputTextField(
|
||||
pinLength: 6,
|
||||
cursor: Cursor(
|
||||
color: primaryColor,
|
||||
enabled: true,
|
||||
width: 2,
|
||||
height: 23),
|
||||
decoration: BoxLooseDecoration(
|
||||
strokeColorBuilder: PinListenColorBuilder(
|
||||
primaryColor, Colors.grey.shade400)),
|
||||
|
||||
@@ -90,6 +90,7 @@ class _TermEditorState extends State<TermEditor> {
|
||||
title:
|
||||
LocalText(context, 'term', fontSize: 20, color: primaryColor),
|
||||
bottom: TabBar.secondary(
|
||||
dividerColor: Colors.grey.shade400,
|
||||
indicatorColor: primaryColor,
|
||||
labelColor: primaryColor,
|
||||
labelStyle:
|
||||
@@ -117,14 +118,16 @@ class _TermEditorState extends State<TermEditor> {
|
||||
children: [
|
||||
isEdit
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15, right: 15, top: 20, bottom: 8),
|
||||
child: TextField(
|
||||
autofocus: true,
|
||||
controller: enController,
|
||||
style: TextStyle(
|
||||
fontSize: 15, color: Colors.black87),
|
||||
decoration: const InputDecoration(
|
||||
border: InputBorder.none),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
cursorColor: primaryColor,
|
||||
keyboardType: TextInputType.multiline,
|
||||
maxLines: null,
|
||||
@@ -149,7 +152,8 @@ class _TermEditorState extends State<TermEditor> {
|
||||
),
|
||||
isEdit
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(15),
|
||||
padding: const EdgeInsets.only(
|
||||
left: 15, right: 15, top: 20, bottom: 8),
|
||||
child: TextField(
|
||||
style: TextStyle(
|
||||
fontSize: 14, color: Colors.black87),
|
||||
|
||||
@@ -12,14 +12,13 @@ class LocalDropdown<T> extends StatelessWidget {
|
||||
final String? labelKey;
|
||||
|
||||
const LocalDropdown(
|
||||
{Key? key,
|
||||
{super.key,
|
||||
this.callback,
|
||||
this.iconData,
|
||||
this.selectedValue,
|
||||
this.values,
|
||||
this.labelKey,
|
||||
this.display})
|
||||
: super(key: key);
|
||||
this.display});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -50,10 +49,7 @@ class LocalDropdown<T> extends StatelessWidget {
|
||||
isDense: true,
|
||||
value: selectedValue,
|
||||
style: TextStyle(color: Colors.black, fontSize: 14),
|
||||
underline: Container(
|
||||
height: 1,
|
||||
color: Colors.grey,
|
||||
),
|
||||
underline: Container(height: 1, color: primaryColor),
|
||||
onChanged: (T? newValue) {
|
||||
callback!(newValue!);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user