update
This commit is contained in:
@@ -6,14 +6,14 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter/services.dart' show rootBundle;
|
import 'package:flutter/services.dart' show rootBundle;
|
||||||
|
|
||||||
class AppTranslations {
|
class AppTranslations {
|
||||||
Locale locale;
|
late Locale locale;
|
||||||
static Map<dynamic, dynamic> _localisedValues;
|
static late Map<dynamic, dynamic> _localisedValues;
|
||||||
|
|
||||||
AppTranslations(Locale locale) {
|
AppTranslations(Locale locale) {
|
||||||
this.locale = locale;
|
this.locale = locale;
|
||||||
}
|
}
|
||||||
|
|
||||||
static AppTranslations of(BuildContext context) {
|
static AppTranslations? of(BuildContext context) {
|
||||||
return Localizations.of<AppTranslations>(context, AppTranslations);
|
return Localizations.of<AppTranslations>(context, AppTranslations);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ class AppTranslations {
|
|||||||
|
|
||||||
get currentLanguage => locale.languageCode;
|
get currentLanguage => locale.languageCode;
|
||||||
|
|
||||||
String text(String key, {List<String> translationVariables}) {
|
String text(String key, {List<String>? translationVariables}) {
|
||||||
String value = _localisedValues[key];
|
String value = _localisedValues[key];
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
return "$key not found";
|
return "$key not found";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class AppTranslationsDelegate extends LocalizationsDelegate<AppTranslations> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Future<AppTranslations> load(Locale locale) {
|
Future<AppTranslations> load(Locale locale) {
|
||||||
return AppTranslations.load(newLocale ?? locale);
|
return AppTranslations.load(newLocale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|||||||
@@ -23,5 +23,5 @@ class Translation {
|
|||||||
supportedLanguagesCodes.map<Locale>((language) => Locale(language, ""));
|
supportedLanguagesCodes.map<Locale>((language) => Locale(language, ""));
|
||||||
|
|
||||||
//function to be invoked when changing the language
|
//function to be invoked when changing the language
|
||||||
LocaleChangeCallback? onLocaleChanged;
|
late LocaleChangeCallback onLocaleChanged;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:fcs/domain/vo/contact.dart';
|
import 'package:fcs/domain/vo/contact.dart';
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/localization/app_translations.dart';
|
|
||||||
import 'package:fcs/pages/contact/model/contact_model.dart';
|
import 'package:fcs/pages/contact/model/contact_model.dart';
|
||||||
import 'package:fcs/pages/main/util.dart';
|
import 'package:fcs/pages/main/util.dart';
|
||||||
import 'package:fcs/pages/widgets/input_text.dart';
|
import 'package:fcs/pages/widgets/input_text.dart';
|
||||||
@@ -14,7 +13,7 @@ import 'package:provider/provider.dart';
|
|||||||
import 'widgets.dart';
|
import 'widgets.dart';
|
||||||
|
|
||||||
class ContactEditor extends StatefulWidget {
|
class ContactEditor extends StatefulWidget {
|
||||||
final Contact contact;
|
final Contact? contact;
|
||||||
const ContactEditor({this.contact});
|
const ContactEditor({this.contact});
|
||||||
@override
|
@override
|
||||||
_ContactEditorState createState() => _ContactEditorState();
|
_ContactEditorState createState() => _ContactEditorState();
|
||||||
@@ -29,22 +28,23 @@ class _ContactEditorState extends State<ContactEditor> {
|
|||||||
TextEditingController _facebook = new TextEditingController();
|
TextEditingController _facebook = new TextEditingController();
|
||||||
|
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
bool isNew;
|
bool isNew = false;
|
||||||
|
|
||||||
|
Contact? _contact;
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
if (widget.contact != null) _contact = widget.contact!;
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.contact != null) {
|
isNew = widget.contact == null;
|
||||||
isNew = false;
|
}
|
||||||
_usaPhone.text = widget.contact.usaContactNumber;
|
|
||||||
_mmPhone.text = widget.contact.mmContactNumber;
|
initContact() {
|
||||||
_usaAddress.text = widget.contact.usaAddress;
|
_usaPhone.text = _contact?.usaContactNumber ?? '';
|
||||||
_mmAddress.text = widget.contact.mmAddress;
|
_mmPhone.text = _contact?.mmContactNumber ?? '';
|
||||||
_email.text = widget.contact.emailAddress;
|
_usaAddress.text = _contact?.usaAddress ?? '';
|
||||||
_facebook.text = widget.contact.facebookLink;
|
_mmAddress.text = _contact?.mmAddress ?? '';
|
||||||
} else {
|
_email.text = _contact?.emailAddress ?? '';
|
||||||
isNew = true;
|
_facebook.text = _contact?.facebookLink ?? '';
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -136,14 +136,17 @@ class _ContactEditorState extends State<ContactEditor> {
|
|||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
widget.contact.usaContactNumber = _usaPhone.text;
|
_contact?.usaContactNumber = _usaPhone.text;
|
||||||
widget.contact.mmContactNumber = _mmPhone.text;
|
_contact?.mmContactNumber = _mmPhone.text;
|
||||||
widget.contact.usaAddress = _usaAddress.text;
|
_contact?.usaAddress = _usaAddress.text;
|
||||||
widget.contact.mmAddress = _mmAddress.text;
|
_contact?.mmAddress = _mmAddress.text;
|
||||||
widget.contact.emailAddress = _email.text;
|
_contact?.emailAddress = _email.text;
|
||||||
widget.contact.facebookLink = _facebook.text;
|
_contact?.facebookLink = _facebook.text;
|
||||||
var contactModel = Provider.of<ContactModel>(context, listen: false);
|
if (this._contact != null) {
|
||||||
await contactModel.saveContact(widget.contact);
|
var contactModel = Provider.of<ContactModel>(context, listen: false);
|
||||||
|
await contactModel.saveContact(_contact!);
|
||||||
|
}
|
||||||
|
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:fcs/domain/entities/setting.dart';
|
import 'package:fcs/domain/entities/setting.dart';
|
||||||
import 'package:fcs/domain/vo/contact.dart';
|
import 'package:fcs/domain/vo/contact.dart';
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/localization/app_translations.dart';
|
|
||||||
import 'package:fcs/pages/contact/contact_editor.dart';
|
import 'package:fcs/pages/contact/contact_editor.dart';
|
||||||
import 'package:fcs/pages/main/model/main_model.dart';
|
import 'package:fcs/pages/main/model/main_model.dart';
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ Widget itemTitle(BuildContext context, String textKey) {
|
|||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(left: 18.0, top: 25, bottom: 5),
|
padding: const EdgeInsets.only(left: 18.0, top: 25, bottom: 5),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppTranslations.of(context).text(textKey),
|
AppTranslations.of(context)!.text(textKey),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold, fontSize: 18, color: Colors.black),
|
fontWeight: FontWeight.bold, fontSize: 18, color: Colors.black),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget subItemTitle(BuildContext context, String textKey, {IconData iconData}) {
|
Widget subItemTitle(BuildContext context, String textKey, {IconData? iconData}) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.only(left: 0, top: 0, bottom: 0),
|
padding: const EdgeInsets.only(left: 0, top: 0, bottom: 0),
|
||||||
child: Row(
|
child: Row(
|
||||||
@@ -25,7 +25,7 @@ Widget subItemTitle(BuildContext context, String textKey, {IconData iconData}) {
|
|||||||
),
|
),
|
||||||
SizedBox(width: 10),
|
SizedBox(width: 10),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.of(context).text(textKey),
|
AppTranslations.of(context)!.text(textKey),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.w700, fontSize: 15, color: primaryColor),
|
fontWeight: FontWeight.w700, fontSize: 15, color: primaryColor),
|
||||||
),
|
),
|
||||||
@@ -34,8 +34,8 @@ Widget subItemTitle(BuildContext context, String textKey, {IconData iconData}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget contactItem(BuildContext context, String text, IconData iconData,
|
Widget contactItem(BuildContext context, String? text, IconData iconData,
|
||||||
{Function() onTap, String labelKey}) {
|
{Function()? onTap, String? labelKey}) {
|
||||||
return Material(
|
return Material(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.only(left: 18.0, bottom: 10, right: 18),
|
padding: const EdgeInsets.only(left: 18.0, bottom: 10, right: 18),
|
||||||
|
|||||||
@@ -22,14 +22,13 @@ import 'package:fcs/pages/widgets/local_title.dart';
|
|||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
final DateFormat dateFormat = DateFormat("d MMM yyyy");
|
||||||
|
|
||||||
class DeliveryInfo extends StatefulWidget {
|
class DeliveryInfo extends StatefulWidget {
|
||||||
final Carton box;
|
final Carton? box;
|
||||||
DeliveryInfo({this.box});
|
DeliveryInfo({this.box});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -38,8 +37,8 @@ class DeliveryInfo extends StatefulWidget {
|
|||||||
|
|
||||||
class _DeliveryInfoState extends State<DeliveryInfo> {
|
class _DeliveryInfoState extends State<DeliveryInfo> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
Carton _box;
|
late Carton _box;
|
||||||
String _selectedCartonType;
|
late String _selectedCartonType;
|
||||||
List<Package> _packages = [];
|
List<Package> _packages = [];
|
||||||
List<Carton> _mixBoxes = [];
|
List<Carton> _mixBoxes = [];
|
||||||
Carton _selectedShipmentBox = new Carton();
|
Carton _selectedShipmentBox = new Carton();
|
||||||
@@ -51,16 +50,17 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
|||||||
double volumetricRatio = 0;
|
double volumetricRatio = 0;
|
||||||
double shipmentWeight = 0;
|
double shipmentWeight = 0;
|
||||||
|
|
||||||
bool isMixBox;
|
late bool isMixBox;
|
||||||
bool isFromShipments;
|
late bool isFromShipments;
|
||||||
bool isFromPackages;
|
late bool isFromPackages;
|
||||||
bool isSmallBag;
|
late bool isSmallBag;
|
||||||
bool isEdiable;
|
late bool isEdiable;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_box = widget.box;
|
if(widget.box != null)
|
||||||
|
_box = widget.box!;
|
||||||
_selectedCartonType = _box.cartonType;
|
_selectedCartonType = _box.cartonType;
|
||||||
|
|
||||||
//for shipment weight
|
//for shipment weight
|
||||||
@@ -143,13 +143,13 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
|||||||
iconData: Ionicons.ios_airplane,
|
iconData: Ionicons.ios_airplane,
|
||||||
);
|
);
|
||||||
final fcsIDBox = DisplayText(
|
final fcsIDBox = DisplayText(
|
||||||
text: _box.fcsID == null ? "" : _box.fcsID,
|
text: _box.fcsID,
|
||||||
labelTextKey: "box.fcs.id",
|
labelTextKey: "box.fcs.id",
|
||||||
icon: FcsIDIcon(),
|
icon: FcsIDIcon(),
|
||||||
);
|
);
|
||||||
|
|
||||||
final customerNameBox = DisplayText(
|
final customerNameBox = DisplayText(
|
||||||
text: _box.userName == null ? "" : _box.userName,
|
text: _box.userName,
|
||||||
labelTextKey: "box.name",
|
labelTextKey: "box.name",
|
||||||
iconData: Icons.person,
|
iconData: Icons.person,
|
||||||
);
|
);
|
||||||
@@ -173,13 +173,11 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: new Text(
|
child: new Text(
|
||||||
_selectedShipmentBox.shipmentNumber == null
|
_selectedShipmentBox.shipmentNumber,
|
||||||
? ""
|
|
||||||
: _selectedShipmentBox.shipmentNumber,
|
|
||||||
style: textStyle,
|
style: textStyle,
|
||||||
)),
|
)),
|
||||||
new Text(
|
new Text(
|
||||||
_selectedShipmentBox.desc == null ? "" : _selectedShipmentBox.desc,
|
_selectedShipmentBox.desc,
|
||||||
style: textStyle,
|
style: textStyle,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -216,7 +214,7 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
final shipmentWeightBox = DisplayText(
|
final shipmentWeightBox = DisplayText(
|
||||||
text: shipmentWeight != null ? shipmentWeight.toStringAsFixed(0) : "",
|
text: shipmentWeight.toStringAsFixed(0) : "",
|
||||||
labelTextKey: "box.shipment_weight",
|
labelTextKey: "box.shipment_weight",
|
||||||
iconData: MaterialCommunityIcons.weight,
|
iconData: MaterialCommunityIcons.weight,
|
||||||
);
|
);
|
||||||
@@ -302,7 +300,7 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
|||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
var deliveryModel = Provider.of<DeliveryModel>(context, listen: false);
|
var deliveryModel = Provider.of<DeliveryModel>(context, listen: false);
|
||||||
await deliveryModel.deliver(widget.box);
|
await deliveryModel.deliver(this._box);
|
||||||
Navigator.pop(context, true);
|
Navigator.pop(context, true);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
|
|||||||
@@ -3,14 +3,13 @@ import 'package:fcs/helpers/theme.dart';
|
|||||||
import 'package:fcs/pages/main/util.dart';
|
import 'package:fcs/pages/main/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
import 'delivery_info.dart';
|
import 'delivery_info.dart';
|
||||||
|
|
||||||
class DeliveryListRow extends StatelessWidget {
|
class DeliveryListRow extends StatelessWidget {
|
||||||
final Carton box;
|
final Carton? box;
|
||||||
DeliveryListRow({Key key, this.box}) : super(key: key);
|
DeliveryListRow({Key? key, this.box}) : super(key: key);
|
||||||
|
|
||||||
final double dotSize = 15.0;
|
final double dotSize = 15.0;
|
||||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||||
@@ -19,10 +18,11 @@ class DeliveryListRow extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
if (box != null)
|
||||||
context,
|
Navigator.push(
|
||||||
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: box)),
|
context,
|
||||||
);
|
CupertinoPageRoute(builder: (context) => DeliveryInfo(box: box!)),
|
||||||
|
);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 15, right: 15),
|
padding: EdgeInsets.only(left: 15, right: 15),
|
||||||
@@ -48,7 +48,7 @@ class DeliveryListRow extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0),
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
child: new Text(
|
child: new Text(
|
||||||
box.cartonNumber ?? "",
|
box?.cartonNumber ?? "",
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 15.0, color: Colors.black),
|
fontSize: 15.0, color: Colors.black),
|
||||||
),
|
),
|
||||||
@@ -56,7 +56,7 @@ class DeliveryListRow extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
||||||
child: new Text(
|
child: new Text(
|
||||||
box.userName ?? "",
|
box?.userName ?? "",
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 15.0, color: Colors.grey),
|
fontSize: 15.0, color: Colors.grey),
|
||||||
),
|
),
|
||||||
@@ -72,14 +72,14 @@ class DeliveryListRow extends StatelessWidget {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
child: getStatus(box.status == null ? "" : box.status),
|
child: getStatus(box?.status ?? ''),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Text(
|
new Text(
|
||||||
"${box.actualWeight?.toString() ?? ''} lb",
|
"${box?.actualWeight.toString() ?? ''} lb",
|
||||||
style:
|
style:
|
||||||
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -7,13 +7,12 @@ import 'package:fcs/pages/widgets/input_text.dart';
|
|||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class DeliveryAddressEditor extends StatefulWidget {
|
class DeliveryAddressEditor extends StatefulWidget {
|
||||||
final DeliveryAddress deliveryAddress;
|
final DeliveryAddress? deliveryAddress;
|
||||||
final User user;
|
final User? user;
|
||||||
DeliveryAddressEditor({this.deliveryAddress, this.user});
|
DeliveryAddressEditor({this.deliveryAddress, this.user});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -38,7 +37,7 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
if (widget.deliveryAddress != null) {
|
if (widget.deliveryAddress != null) {
|
||||||
_isNew = false;
|
_isNew = false;
|
||||||
_deliveryAddress = widget.deliveryAddress;
|
_deliveryAddress = widget.deliveryAddress!;
|
||||||
_nameController.text = _deliveryAddress.fullName;
|
_nameController.text = _deliveryAddress.fullName;
|
||||||
_address1Controller.text = _deliveryAddress.addressLine1;
|
_address1Controller.text = _deliveryAddress.addressLine1;
|
||||||
_address2Controller.text = _deliveryAddress.addressLine2;
|
_address2Controller.text = _deliveryAddress.addressLine2;
|
||||||
@@ -198,7 +197,7 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.user != null) {
|
if (widget.user != null) {
|
||||||
deliveryAddress.userID = widget.user.id;
|
deliveryAddress.userID = widget.user!.id;
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
@@ -224,7 +223,7 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (widget.user != null) {
|
if (widget.user != null) {
|
||||||
deliveryAddress.userID = widget.user.id;
|
deliveryAddress.userID = widget.user!.id;
|
||||||
}
|
}
|
||||||
setState(() {
|
setState(() {
|
||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
@@ -255,7 +254,7 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
|||||||
DeliveryAddressModel deliveryAddressModel =
|
DeliveryAddressModel deliveryAddressModel =
|
||||||
Provider.of<DeliveryAddressModel>(context, listen: false);
|
Provider.of<DeliveryAddressModel>(context, listen: false);
|
||||||
if (widget.user != null) {
|
if (widget.user != null) {
|
||||||
_deliveryAddress.userID = widget.user.id;
|
_deliveryAddress.userID = widget.user!.id;
|
||||||
}
|
}
|
||||||
await deliveryAddressModel.deleteDeliveryAddress(_deliveryAddress);
|
await deliveryAddressModel.deleteDeliveryAddress(_deliveryAddress);
|
||||||
Navigator.pop(context, true);
|
Navigator.pop(context, true);
|
||||||
@@ -278,7 +277,7 @@ class _DeliveryAddressEditorState extends State<DeliveryAddressEditor> {
|
|||||||
_stateController.text != "Yangon";
|
_stateController.text != "Yangon";
|
||||||
} else {
|
} else {
|
||||||
DeliveryAddress deliveryAddress = _getPayload();
|
DeliveryAddress deliveryAddress = _getPayload();
|
||||||
return widget.deliveryAddress.isChangedForEdit(deliveryAddress);
|
return this._deliveryAddress.isChangedForEdit(deliveryAddress);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import 'model/delivery_address_model.dart';
|
|||||||
|
|
||||||
class DeliveryAddressList extends StatefulWidget {
|
class DeliveryAddressList extends StatefulWidget {
|
||||||
final bool isAdminCreation;
|
final bool isAdminCreation;
|
||||||
final DeliveryAddress deliveryAddress;
|
final DeliveryAddress? deliveryAddress;
|
||||||
const DeliveryAddressList(
|
const DeliveryAddressList(
|
||||||
{Key key, this.isAdminCreation = false, this.deliveryAddress})
|
{Key? key, this.isAdminCreation = false, this.deliveryAddress})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
@override
|
@override
|
||||||
_DeliveryAddressListState createState() => _DeliveryAddressListState();
|
_DeliveryAddressListState createState() => _DeliveryAddressListState();
|
||||||
@@ -85,7 +85,7 @@ class _DeliveryAddressListState extends State<DeliveryAddressList> {
|
|||||||
padding: const EdgeInsets.all(10.0),
|
padding: const EdgeInsets.all(10.0),
|
||||||
child: Icon(Icons.check,
|
child: Icon(Icons.check,
|
||||||
color: widget.isAdminCreation
|
color: widget.isAdminCreation
|
||||||
? widget.deliveryAddress.id == deliveryAddress.id
|
? widget.deliveryAddress?.id == deliveryAddress.id
|
||||||
? primaryColor
|
? primaryColor
|
||||||
: Colors.black26
|
: Colors.black26
|
||||||
: deliveryAddress.isDefault
|
: deliveryAddress.isDefault
|
||||||
|
|||||||
@@ -3,15 +3,14 @@ import 'package:fcs/helpers/theme.dart';
|
|||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
|
|
||||||
typedef SelectionCallback(DeliveryAddress deliveryAddress);
|
typedef SelectionCallback(DeliveryAddress deliveryAddress);
|
||||||
|
|
||||||
class DeliveryAddressRow extends StatelessWidget {
|
class DeliveryAddressRow extends StatelessWidget {
|
||||||
final DeliveryAddress deliveryAddress;
|
final DeliveryAddress deliveryAddress;
|
||||||
final SelectionCallback selectionCallback;
|
final SelectionCallback? selectionCallback;
|
||||||
const DeliveryAddressRow(
|
const DeliveryAddressRow(
|
||||||
{Key key, this.deliveryAddress, this.selectionCallback})
|
{Key? key, required this.deliveryAddress, this.selectionCallback})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -19,7 +18,7 @@ class DeliveryAddressRow extends StatelessWidget {
|
|||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: selectionCallback == null
|
onTap: selectionCallback == null
|
||||||
? null
|
? null
|
||||||
: () => this.selectionCallback(deliveryAddress),
|
: () => this.selectionCallback!(deliveryAddress),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -54,8 +53,8 @@ class DeliveryAddressRow extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget line(BuildContext context, String text,
|
Widget line(BuildContext context, String? text,
|
||||||
{IconData iconData, Color color, double fontSize}) {
|
{IconData? iconData, Color? color, double? fontSize}) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
iconData == null
|
iconData == null
|
||||||
@@ -69,7 +68,7 @@ class DeliveryAddressRow extends StatelessWidget {
|
|||||||
context,
|
context,
|
||||||
text ?? "",
|
text ?? "",
|
||||||
fontSize: fontSize ?? 14,
|
fontSize: fontSize ?? 14,
|
||||||
color: color,
|
color: color ?? Colors.grey,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,24 +1,21 @@
|
|||||||
import 'package:fcs/domain/entities/discount.dart';
|
import 'package:fcs/domain/entities/discount.dart';
|
||||||
import 'package:fcs/domain/entities/user.dart';
|
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/localization/app_translations.dart';
|
import 'package:fcs/localization/app_translations.dart';
|
||||||
import 'package:fcs/pages/discount/model/discount_model.dart';
|
import 'package:fcs/pages/discount/model/discount_model.dart';
|
||||||
import 'package:fcs/pages/main/util.dart';
|
import 'package:fcs/pages/main/util.dart';
|
||||||
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
|
||||||
import 'package:fcs/pages/user_search/user_serach.dart';
|
import 'package:fcs/pages/user_search/user_serach.dart';
|
||||||
import 'package:fcs/pages/widgets/display_text.dart';
|
import 'package:fcs/pages/widgets/display_text.dart';
|
||||||
import 'package:fcs/pages/widgets/input_text.dart';
|
import 'package:fcs/pages/widgets/input_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class DiscountEditor extends StatefulWidget {
|
class DiscountEditor extends StatefulWidget {
|
||||||
final Discount discount;
|
final Discount? discount;
|
||||||
|
|
||||||
const DiscountEditor({Key key, this.discount}) : super(key: key);
|
const DiscountEditor({Key? key, this.discount}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
_DiscountEditorState createState() => _DiscountEditorState();
|
_DiscountEditorState createState() => _DiscountEditorState();
|
||||||
}
|
}
|
||||||
@@ -38,12 +35,12 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.discount != null) {
|
if (widget.discount != null) {
|
||||||
_discount = widget.discount;
|
_discount = widget.discount!;
|
||||||
_codeController.text = _discount.code;
|
_codeController.text = _discount.code;
|
||||||
_amountController.text = _discount.amount.toStringAsFixed(2);
|
_amountController.text = _discount.amount.toStringAsFixed(2);
|
||||||
_statusController.text = _discount.status;
|
_statusController.text = _discount.status;
|
||||||
customerName = widget.discount.customerName;
|
customerName = _discount.customerName;
|
||||||
customerId = widget.discount.customerId;
|
customerId = _discount.customerId;
|
||||||
} else {
|
} else {
|
||||||
_isNew = true;
|
_isNew = true;
|
||||||
}
|
}
|
||||||
@@ -71,7 +68,7 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
child: DisplayText(
|
child: DisplayText(
|
||||||
text: customerName != null ? customerName : "",
|
text: customerName,
|
||||||
labelTextKey: "discount.name",
|
labelTextKey: "discount.name",
|
||||||
iconData: Feather.user,
|
iconData: Feather.user,
|
||||||
)),
|
)),
|
||||||
@@ -93,7 +90,7 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: Text(
|
title: Text(
|
||||||
AppTranslations.of(context).text("discount.form"),
|
AppTranslations.of(context)!.text("discount.form"),
|
||||||
),
|
),
|
||||||
leading: new IconButton(
|
leading: new IconButton(
|
||||||
icon: new Icon(CupertinoIcons.back),
|
icon: new Icon(CupertinoIcons.back),
|
||||||
@@ -162,7 +159,7 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
|||||||
if (_isNew) {
|
if (_isNew) {
|
||||||
await discountModel.addDiscount(_discount);
|
await discountModel.addDiscount(_discount);
|
||||||
} else {
|
} else {
|
||||||
_discount.id = widget.discount.id;
|
_discount.id = this._discount.id;
|
||||||
await discountModel.updateDiscount(_discount);
|
await discountModel.updateDiscount(_discount);
|
||||||
}
|
}
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -186,7 +183,7 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
|||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
var discountModel = Provider.of<DiscountModel>(context, listen: false);
|
var discountModel = Provider.of<DiscountModel>(context, listen: false);
|
||||||
await discountModel.deleteDiscount(widget.discount);
|
await discountModel.deleteDiscount(_discount);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
@@ -208,7 +205,7 @@ class _DiscountEditorState extends State<DiscountEditor> {
|
|||||||
customerName: customerName,
|
customerName: customerName,
|
||||||
customerId: customerId,
|
customerId: customerId,
|
||||||
amount: double.parse(_amountController.text));
|
amount: double.parse(_amountController.text));
|
||||||
return widget.discount.isChangedForEdit(_discount);
|
return widget.discount!.isChangedForEdit(_discount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import 'discount_editor.dart';
|
|||||||
class DiscountList extends StatefulWidget {
|
class DiscountList extends StatefulWidget {
|
||||||
final bool selectionMode;
|
final bool selectionMode;
|
||||||
|
|
||||||
const DiscountList({Key key, this.selectionMode = false}) : super(key: key);
|
const DiscountList({Key? key, this.selectionMode = false}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
_DiscountListState createState() => _DiscountListState();
|
_DiscountListState createState() => _DiscountListState();
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@ class _DiscountListState extends State<DiscountList> {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
title: Text(
|
title: Text(
|
||||||
AppTranslations.of(context).text("discount.title"),
|
AppTranslations.of(context)!.text("discount.title"),
|
||||||
),
|
),
|
||||||
leading: new IconButton(
|
leading: new IconButton(
|
||||||
icon: new Icon(CupertinoIcons.back),
|
icon: new Icon(CupertinoIcons.back),
|
||||||
|
|||||||
@@ -5,15 +5,14 @@ import 'package:fcs/pages/discount/discount_editor.dart';
|
|||||||
import 'package:fcs/pages/main/util.dart';
|
import 'package:fcs/pages/main/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
typedef OnSelect(Discount discount);
|
typedef OnSelect(Discount discount);
|
||||||
|
|
||||||
class DiscountListRow extends StatelessWidget {
|
class DiscountListRow extends StatelessWidget {
|
||||||
final OnSelect onSelect;
|
final OnSelect? onSelect;
|
||||||
final Discount discount;
|
final Discount? discount;
|
||||||
DiscountListRow({Key key, this.discount, this.onSelect}) : super(key: key);
|
DiscountListRow({Key? key, this.discount, this.onSelect}) : super(key: key);
|
||||||
|
|
||||||
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
final DateFormat dateFormat = new DateFormat("dd MMM yyyy");
|
||||||
|
|
||||||
@@ -21,8 +20,8 @@ class DiscountListRow extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (onSelect != null) {
|
if (onSelect != null && discount != null) {
|
||||||
onSelect(discount);
|
onSelect!(discount!);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
@@ -49,7 +48,7 @@ class DiscountListRow extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0),
|
padding: const EdgeInsets.only(left: 8.0),
|
||||||
child: new Text(
|
child: new Text(
|
||||||
discount.code ?? "",
|
discount?.code ?? "",
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 15.0, color: Colors.black),
|
fontSize: 15.0, color: Colors.black),
|
||||||
),
|
),
|
||||||
@@ -57,7 +56,7 @@ class DiscountListRow extends StatelessWidget {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
padding: const EdgeInsets.only(left: 10.0, top: 10),
|
||||||
child: new Text(
|
child: new Text(
|
||||||
discount.customerName ?? "",
|
discount?.customerName ?? "",
|
||||||
style: new TextStyle(
|
style: new TextStyle(
|
||||||
fontSize: 15.0, color: Colors.grey),
|
fontSize: 15.0, color: Colors.grey),
|
||||||
),
|
),
|
||||||
@@ -73,14 +72,14 @@ class DiscountListRow extends StatelessWidget {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(0),
|
padding: const EdgeInsets.all(0),
|
||||||
child: Text(discount.status),
|
child: Text(discount?.status ?? ''),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
padding: const EdgeInsets.only(left: 8.0, top: 5, bottom: 5),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
new Text(
|
new Text(
|
||||||
"${discount.amount.toStringAsFixed(2) ?? ''}",
|
"${discount?.amount.toStringAsFixed(2) ?? ''}",
|
||||||
style:
|
style:
|
||||||
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
new TextStyle(fontSize: 15.0, color: Colors.grey),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ import 'package:logging/logging.dart';
|
|||||||
class DiscountModel extends BaseModel {
|
class DiscountModel extends BaseModel {
|
||||||
final log = Logger('DiscountModel');
|
final log = Logger('DiscountModel');
|
||||||
|
|
||||||
StreamSubscription<QuerySnapshot> listener;
|
StreamSubscription<QuerySnapshot>? listener;
|
||||||
|
|
||||||
List<Discount> _discounts = [];
|
List<Discount> _discounts = [];
|
||||||
List<Discount> get discounts =>
|
List<Discount> get discounts =>
|
||||||
_selectedIndex == 1 ? _discounts : List<Discount>.from(_used.values);
|
_selectedIndex == 1 ? _discounts : List<Discount>.from(_used.values);
|
||||||
|
|
||||||
Paginator _used;
|
late Paginator _used;
|
||||||
bool isLoading = false;
|
bool isLoading = false;
|
||||||
int _selectedIndex = 1;
|
int _selectedIndex = 1;
|
||||||
set selectedIndex(int index) {
|
set selectedIndex(int index) {
|
||||||
@@ -25,14 +25,14 @@ class DiscountModel extends BaseModel {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
get selectedIndex => _selectedIndex;
|
int get selectedIndex => _selectedIndex;
|
||||||
|
|
||||||
initData() {
|
initData() {
|
||||||
_selectedIndex = 1;
|
_selectedIndex = 1;
|
||||||
_load();
|
_load();
|
||||||
|
|
||||||
if (_used != null) _used.close();
|
if (_used != null) _used.close();
|
||||||
_used = _getUsed();
|
if (_getUsed() != null) _used = _getUsed()!;
|
||||||
_used.load();
|
_used.load();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ class DiscountModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_load() {
|
_load() {
|
||||||
if (listener != null) listener.cancel();
|
if (listener != null) listener!.cancel();
|
||||||
try {
|
try {
|
||||||
listener = Firestore.instance
|
listener = Firestore.instance
|
||||||
.collection("/$discounts_collection")
|
.collection("/$discounts_collection")
|
||||||
@@ -60,7 +60,7 @@ class DiscountModel extends BaseModel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Paginator _getUsed() {
|
Paginator? _getUsed() {
|
||||||
if (user == null || !user.hasFcsShipments()) return null;
|
if (user == null || !user.hasFcsShipments()) return null;
|
||||||
|
|
||||||
var pageQuery = Firestore.instance
|
var pageQuery = Firestore.instance
|
||||||
@@ -73,7 +73,7 @@ class DiscountModel extends BaseModel {
|
|||||||
return paginator;
|
return paginator;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<Discount>> getDiscount(String userID) async {
|
Future<List<Discount>?> getDiscount(String userID) async {
|
||||||
String path = "/$discounts_collection";
|
String path = "/$discounts_collection";
|
||||||
try {
|
try {
|
||||||
var q = Firestore.instance
|
var q = Firestore.instance
|
||||||
@@ -113,7 +113,7 @@ class DiscountModel extends BaseModel {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
logout() async {
|
logout() async {
|
||||||
if (listener != null) await listener.cancel();
|
if (listener != null) await listener!.cancel();
|
||||||
if (_used != null) _used.close();
|
if (_used != null) _used.close();
|
||||||
|
|
||||||
_discounts = [];
|
_discounts = [];
|
||||||
|
|||||||
@@ -13,14 +13,14 @@ import 'package:provider/provider.dart';
|
|||||||
|
|
||||||
class FAQDetailPage extends StatefulWidget {
|
class FAQDetailPage extends StatefulWidget {
|
||||||
final FAQ faq;
|
final FAQ faq;
|
||||||
const FAQDetailPage({this.faq});
|
const FAQDetailPage({required this.faq});
|
||||||
@override
|
@override
|
||||||
_FAQDetailPageState createState() => _FAQDetailPageState();
|
_FAQDetailPageState createState() => _FAQDetailPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _FAQDetailPageState extends State<FAQDetailPage> {
|
class _FAQDetailPageState extends State<FAQDetailPage> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
FAQ faq;
|
FAQ faq = new FAQ();
|
||||||
|
|
||||||
intState() {
|
intState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
|||||||
@@ -10,13 +10,12 @@ import 'package:fcs/pages/widgets/local_text.dart';
|
|||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
const info = "Select additional page";
|
const info = "Select additional page";
|
||||||
|
|
||||||
class FAQEditor extends StatefulWidget {
|
class FAQEditor extends StatefulWidget {
|
||||||
final FAQ faq;
|
final FAQ? faq;
|
||||||
const FAQEditor({this.faq});
|
const FAQEditor({this.faq});
|
||||||
@override
|
@override
|
||||||
_FAQEditorState createState() => _FAQEditorState();
|
_FAQEditorState createState() => _FAQEditorState();
|
||||||
@@ -35,20 +34,22 @@ class _FAQEditorState extends State<FAQEditor> {
|
|||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
bool _isNew = false;
|
bool _isNew = false;
|
||||||
String _pageLink = info;
|
String _pageLink = info;
|
||||||
|
FAQ _faq = new FAQ();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
_isNew = widget.faq == null;
|
_isNew = widget.faq == null;
|
||||||
if (widget.faq != null) {
|
if (widget.faq != null) {
|
||||||
_sn.text = widget.faq.sn.toString();
|
_faq = widget.faq!;
|
||||||
_engQ.text = widget.faq.questionEng;
|
_sn.text = _faq.sn.toString();
|
||||||
_mmQ.text = widget.faq.questionMm;
|
_engQ.text = _faq.questionEng;
|
||||||
_engA.text = widget.faq.answerEng;
|
_mmQ.text = _faq.questionMm;
|
||||||
_mmA.text = widget.faq.answerMm;
|
_engA.text = _faq.answerEng;
|
||||||
_pageLabelEng.text = widget.faq.pageLinkLabelEng;
|
_mmA.text = _faq.answerMm;
|
||||||
_pageLabelMm.text = widget.faq.pageLinkLabelMm;
|
_pageLabelEng.text = _faq.pageLinkLabelEng;
|
||||||
_pageLink = widget.faq.pageLink;
|
_pageLabelMm.text = _faq.pageLinkLabelMm;
|
||||||
|
_pageLink = _faq.pageLink;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,7 +90,8 @@ class _FAQEditorState extends State<FAQEditor> {
|
|||||||
height: 2,
|
height: 2,
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
),
|
),
|
||||||
onChanged: (String newValue) {
|
onChanged: (String? newValue) {
|
||||||
|
if(newValue != null)
|
||||||
setState(() {
|
setState(() {
|
||||||
_pageLink = newValue;
|
_pageLink = newValue;
|
||||||
});
|
});
|
||||||
@@ -211,7 +213,7 @@ class _FAQEditorState extends State<FAQEditor> {
|
|||||||
if (_isNew) {
|
if (_isNew) {
|
||||||
await faqModel.addFAQ(_faq);
|
await faqModel.addFAQ(_faq);
|
||||||
} else {
|
} else {
|
||||||
_faq.id = widget.faq.id;
|
_faq.id = this._faq.id;
|
||||||
await faqModel.updateFAQ(_faq);
|
await faqModel.updateFAQ(_faq);
|
||||||
}
|
}
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -234,7 +236,7 @@ class _FAQEditorState extends State<FAQEditor> {
|
|||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
FAQModel faqModel = Provider.of<FAQModel>(context, listen: false);
|
FAQModel faqModel = Provider.of<FAQModel>(context, listen: false);
|
||||||
await faqModel.deleteFAQ(widget.faq);
|
await faqModel.deleteFAQ(this._faq);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
import 'package:fcs/domain/constants.dart';
|
import 'package:fcs/domain/constants.dart';
|
||||||
import 'package:fcs/domain/entities/faq.dart';
|
import 'package:fcs/domain/entities/faq.dart';
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/localization/app_translations.dart';
|
|
||||||
import 'package:fcs/pages/buying_instruction/buying_online.dart';
|
import 'package:fcs/pages/buying_instruction/buying_online.dart';
|
||||||
import 'package:fcs/pages/faq/faq_edit_page.dart';
|
import 'package:fcs/pages/faq/faq_edit_page.dart';
|
||||||
import 'package:fcs/pages/main/model/language_model.dart';
|
import 'package:fcs/pages/main/model/language_model.dart';
|
||||||
import 'package:fcs/pages/main/model/main_model.dart';
|
import 'package:fcs/pages/main/model/main_model.dart';
|
||||||
import 'package:fcs/pages/payment_methods/payment_method_page.dart';
|
import 'package:fcs/pages/payment_methods/payment_method_page.dart';
|
||||||
import 'package:fcs/pages/rates/shipment_rates.dart';
|
import 'package:fcs/pages/rates/shipment_rates.dart';
|
||||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
|
||||||
import 'package:fcs/pages/widgets/fcs_expansion_tile.dart';
|
import 'package:fcs/pages/widgets/fcs_expansion_tile.dart';
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@@ -26,8 +24,8 @@ class FAQListPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _FAQListPageState extends State<FAQListPage>
|
class _FAQListPageState extends State<FAQListPage>
|
||||||
with SingleTickerProviderStateMixin {
|
with SingleTickerProviderStateMixin {
|
||||||
AnimationController _controller;
|
AnimationController? _controller;
|
||||||
Animation<double> _iconTurns;
|
Animation<double>? _iconTurns;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -35,7 +33,7 @@ class _FAQListPageState extends State<FAQListPage>
|
|||||||
_controller = AnimationController(duration: _kExpand, vsync: this);
|
_controller = AnimationController(duration: _kExpand, vsync: this);
|
||||||
var _halfTween = Tween<double>(begin: 0.0, end: 0.5);
|
var _halfTween = Tween<double>(begin: 0.0, end: 0.5);
|
||||||
var _easeInTween = CurveTween(curve: Curves.easeIn);
|
var _easeInTween = CurveTween(curve: Curves.easeIn);
|
||||||
_iconTurns = _controller.drive(_halfTween.chain(_easeInTween));
|
_iconTurns = _controller?.drive(_halfTween.chain(_easeInTween));
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -139,7 +137,7 @@ class _FAQListPageState extends State<FAQListPage>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _pageLink(String linkPage, String text) {
|
Widget _pageLink(String? linkPage, String? text) {
|
||||||
return linkPage == null || linkPage == "" || text == null || text == ""
|
return linkPage == null || linkPage == "" || text == null || text == ""
|
||||||
? Container()
|
? Container()
|
||||||
: Row(
|
: Row(
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:fcs/helpers/theme.dart';
|
|||||||
import 'package:fcs/localization/transalation.dart';
|
import 'package:fcs/localization/transalation.dart';
|
||||||
import 'package:fcs/pages/main/model/language_model.dart';
|
import 'package:fcs/pages/main/model/language_model.dart';
|
||||||
import 'package:fcs/pages/main/model/main_model.dart';
|
import 'package:fcs/pages/main/model/main_model.dart';
|
||||||
import 'package:fcs/pages/signin/signin_page.dart';
|
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -27,9 +26,9 @@ class _InitialLanguageSelectionPageState
|
|||||||
languagesList[1]: languageCodesList[1],
|
languagesList[1]: languageCodesList[1],
|
||||||
};
|
};
|
||||||
|
|
||||||
String selectedLanguage;
|
String selectedLanguage = 'en';
|
||||||
int selectedIndex;
|
late int selectedIndex;
|
||||||
bool _isLoading;
|
bool _isLoading = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -103,7 +102,7 @@ class _InitialLanguageSelectionPageState
|
|||||||
: BoxDecoration(
|
: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
bottom:
|
bottom:
|
||||||
BorderSide(color: Colors.grey[300]),
|
BorderSide(color: Colors.grey.shade300),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
@@ -134,7 +133,7 @@ class _InitialLanguageSelectionPageState
|
|||||||
child: Radio(
|
child: Radio(
|
||||||
value: key,
|
value: key,
|
||||||
groupValue: selectedIndex,
|
groupValue: selectedIndex,
|
||||||
onChanged: (int i) =>
|
onChanged: (int? i) =>
|
||||||
_select(key, language),
|
_select(key, language),
|
||||||
activeColor: primaryColor,
|
activeColor: primaryColor,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/localization/app_translations.dart';
|
|
||||||
import 'package:fcs/pages/main/model/language_model.dart';
|
|
||||||
import 'package:fcs/pages/main/model/main_model.dart';
|
import 'package:fcs/pages/main/model/main_model.dart';
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
@@ -76,7 +74,8 @@ class _ProfileCurrencyEditState extends State<ProfileCurrencyEdit> {
|
|||||||
activeColor: primaryColor,
|
activeColor: primaryColor,
|
||||||
value: Currency.USD,
|
value: Currency.USD,
|
||||||
groupValue: _currency,
|
groupValue: _currency,
|
||||||
onChanged: (Currency value) {
|
onChanged: (Currency? value) {
|
||||||
|
if(value != null)
|
||||||
setState(() {
|
setState(() {
|
||||||
_currency = value;
|
_currency = value;
|
||||||
});
|
});
|
||||||
@@ -94,7 +93,8 @@ class _ProfileCurrencyEditState extends State<ProfileCurrencyEdit> {
|
|||||||
activeColor: primaryColor,
|
activeColor: primaryColor,
|
||||||
value: Currency.MMK,
|
value: Currency.MMK,
|
||||||
groupValue: _currency,
|
groupValue: _currency,
|
||||||
onChanged: (Currency value) {
|
onChanged: (Currency? value) {
|
||||||
|
if(value != null)
|
||||||
setState(() {
|
setState(() {
|
||||||
_currency = value;
|
_currency = value;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ class _ProfileEditState extends State<ProfileEdit> {
|
|||||||
cursorColor: primaryColor,
|
cursorColor: primaryColor,
|
||||||
style: textStyle,
|
style: textStyle,
|
||||||
decoration: new InputDecoration(
|
decoration: new InputDecoration(
|
||||||
labelText: AppTranslations.of(context).text("profile.name"),
|
labelText: AppTranslations.of(context)!.text("profile.name"),
|
||||||
labelStyle: languageModel.isEng ? labelStyle : labelStyleMM,
|
labelStyle: languageModel.isEng ? labelStyle : labelStyleMM,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.person,
|
Icons.person,
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
import 'package:fcs/domain/entities/user.dart';
|
import 'package:fcs/domain/entities/user.dart';
|
||||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
|
||||||
import 'package:fcs/domain/vo/privilege.dart';
|
import 'package:fcs/domain/vo/privilege.dart';
|
||||||
import 'package:fcs/localization/transalation.dart';
|
import 'package:fcs/localization/transalation.dart';
|
||||||
import 'package:fcs/pages/delivery_address/delivery_address_list.dart';
|
import 'package:fcs/pages/delivery_address/delivery_address_list.dart';
|
||||||
import 'package:fcs/pages/delivery_address/delivery_address_row.dart';
|
|
||||||
import 'package:fcs/pages/delivery_address/model/delivery_address_model.dart';
|
import 'package:fcs/pages/delivery_address/model/delivery_address_model.dart';
|
||||||
import 'package:fcs/pages/main/model/language_model.dart';
|
import 'package:fcs/pages/main/model/language_model.dart';
|
||||||
import 'package:fcs/pages/main/model/main_model.dart';
|
import 'package:fcs/pages/main/model/main_model.dart';
|
||||||
@@ -11,7 +9,6 @@ import 'package:fcs/pages/main/util.dart';
|
|||||||
import 'package:fcs/pages/profile/profile_currency_edit.dart';
|
import 'package:fcs/pages/profile/profile_currency_edit.dart';
|
||||||
import 'package:fcs/pages/profile/profile_edit.dart';
|
import 'package:fcs/pages/profile/profile_edit.dart';
|
||||||
import 'package:fcs/pages/staff/model/staff_model.dart';
|
import 'package:fcs/pages/staff/model/staff_model.dart';
|
||||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
|
||||||
import 'package:fcs/pages/widgets/defalut_delivery_address.dart';
|
import 'package:fcs/pages/widgets/defalut_delivery_address.dart';
|
||||||
import 'package:fcs/pages/widgets/display_text.dart';
|
import 'package:fcs/pages/widgets/display_text.dart';
|
||||||
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
|
import 'package:fcs/pages/widgets/fcs_id_icon.dart';
|
||||||
@@ -20,7 +17,6 @@ import 'package:fcs/pages/widgets/progress.dart';
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../../helpers/theme.dart';
|
import '../../helpers/theme.dart';
|
||||||
@@ -35,7 +31,7 @@ class Profile extends StatefulWidget {
|
|||||||
class _ProfileState extends State<Profile> {
|
class _ProfileState extends State<Profile> {
|
||||||
GlobalKey key = GlobalKey();
|
GlobalKey key = GlobalKey();
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
String selectedLanguage;
|
String? selectedLanguage ;
|
||||||
TextEditingController bizNameController = new TextEditingController();
|
TextEditingController bizNameController = new TextEditingController();
|
||||||
|
|
||||||
static final List<String> languagesList = Translation().supportedLanguages;
|
static final List<String> languagesList = Translation().supportedLanguages;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import 'package:provider/provider.dart';
|
|||||||
import 'model/shipment_rate_model.dart';
|
import 'model/shipment_rate_model.dart';
|
||||||
|
|
||||||
class CargoEditor extends StatefulWidget {
|
class CargoEditor extends StatefulWidget {
|
||||||
final CargoType cargo;
|
final CargoType? cargo;
|
||||||
CargoEditor({this.cargo});
|
CargoEditor({this.cargo});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -23,14 +23,14 @@ class _CargoEditorState extends State<CargoEditor> {
|
|||||||
TextEditingController _rateController = new TextEditingController();
|
TextEditingController _rateController = new TextEditingController();
|
||||||
|
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
CargoType _cargo;
|
late CargoType _cargo;
|
||||||
bool _isNew = false;
|
bool _isNew = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.cargo != null) {
|
if (widget.cargo != null) {
|
||||||
_cargo = widget.cargo;
|
_cargo = widget.cargo!;
|
||||||
_descController.text = _cargo.name;
|
_descController.text = _cargo.name;
|
||||||
_rateController.text = _cargo.rate.toStringAsFixed(2);
|
_rateController.text = _cargo.rate.toStringAsFixed(2);
|
||||||
} else {
|
} else {
|
||||||
@@ -71,7 +71,7 @@ class _CargoEditorState extends State<CargoEditor> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
title: Text(AppTranslations.of(context).text("cargo.form.title")),
|
title: Text(AppTranslations.of(context)!.text("cargo.form.title")),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.delete),
|
icon: Icon(Icons.delete),
|
||||||
@@ -114,7 +114,7 @@ class _CargoEditorState extends State<CargoEditor> {
|
|||||||
if (_isNew) {
|
if (_isNew) {
|
||||||
await shipmentRateModel.addCargoType(_cargo);
|
await shipmentRateModel.addCargoType(_cargo);
|
||||||
} else {
|
} else {
|
||||||
_cargo.id = widget.cargo.id;
|
_cargo.id = this._cargo.id;
|
||||||
await shipmentRateModel.updateCargoType(_cargo);
|
await shipmentRateModel.updateCargoType(_cargo);
|
||||||
}
|
}
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -138,7 +138,7 @@ class _CargoEditorState extends State<CargoEditor> {
|
|||||||
try {
|
try {
|
||||||
var shipmentRateModel =
|
var shipmentRateModel =
|
||||||
Provider.of<ShipmentRateModel>(context, listen: false);
|
Provider.of<ShipmentRateModel>(context, listen: false);
|
||||||
await shipmentRateModel.deleteCargoType(widget.cargo.id);
|
await shipmentRateModel.deleteCargoType(this._cargo.id);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
@@ -155,7 +155,7 @@ class _CargoEditorState extends State<CargoEditor> {
|
|||||||
} else {
|
} else {
|
||||||
CargoType _cargo = CargoType(
|
CargoType _cargo = CargoType(
|
||||||
name: _descController.text, rate: double.parse(_rateController.text));
|
name: _descController.text, rate: double.parse(_rateController.text));
|
||||||
return widget.cargo.isChangedForEdit(_cargo);
|
return this._cargo.isChangedForEdit(_cargo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import 'cargo_editor.dart';
|
|||||||
import 'model/shipment_rate_model.dart';
|
import 'model/shipment_rate_model.dart';
|
||||||
|
|
||||||
class CargoTypeList extends StatefulWidget {
|
class CargoTypeList extends StatefulWidget {
|
||||||
const CargoTypeList({Key key}) : super(key: key);
|
const CargoTypeList({Key? key}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
_CargoTypeListState createState() => _CargoTypeListState();
|
_CargoTypeListState createState() => _CargoTypeListState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import 'package:provider/provider.dart';
|
|||||||
import 'model/shipment_rate_model.dart';
|
import 'model/shipment_rate_model.dart';
|
||||||
|
|
||||||
class CustomEditor extends StatefulWidget {
|
class CustomEditor extends StatefulWidget {
|
||||||
final CargoType custom;
|
final CargoType? custom;
|
||||||
CustomEditor({this.custom});
|
CustomEditor({this.custom});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -32,7 +32,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.custom != null) {
|
if (widget.custom != null) {
|
||||||
_custom = widget.custom;
|
_custom = widget.custom!;
|
||||||
_productController.text = _custom.name;
|
_productController.text = _custom.name;
|
||||||
_feeController.text = _custom.customDutyFee.toStringAsFixed(2);
|
_feeController.text = _custom.customDutyFee.toStringAsFixed(2);
|
||||||
_shipmentRateController.text =
|
_shipmentRateController.text =
|
||||||
@@ -83,7 +83,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
|||||||
),
|
),
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
title:
|
title:
|
||||||
Text(AppTranslations.of(context).text("rate.custom.form.title")),
|
Text(AppTranslations.of(context)!.text("rate.custom.form.title")),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.delete),
|
icon: Icon(Icons.delete),
|
||||||
@@ -129,7 +129,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
|||||||
if (_isNew) {
|
if (_isNew) {
|
||||||
await shipmentRateModel.addCustomDuty(_customduty);
|
await shipmentRateModel.addCustomDuty(_customduty);
|
||||||
} else {
|
} else {
|
||||||
_customduty.id = widget.custom.id;
|
_customduty.id = this._custom.id;
|
||||||
await shipmentRateModel.updateCustomDuty(_customduty);
|
await shipmentRateModel.updateCustomDuty(_customduty);
|
||||||
}
|
}
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -154,7 +154,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
|||||||
try {
|
try {
|
||||||
var shipmentRateModel =
|
var shipmentRateModel =
|
||||||
Provider.of<ShipmentRateModel>(context, listen: false);
|
Provider.of<ShipmentRateModel>(context, listen: false);
|
||||||
await shipmentRateModel.deleteCustomDuty(widget.custom.id);
|
await shipmentRateModel.deleteCustomDuty(this._custom.id);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
@@ -175,7 +175,7 @@ class _CustomEditorState extends State<CustomEditor> {
|
|||||||
name: _productController.text,
|
name: _productController.text,
|
||||||
customDutyFee: double.parse(_feeController.text),
|
customDutyFee: double.parse(_feeController.text),
|
||||||
rate: double.parse(_shipmentRateController.text));
|
rate: double.parse(_shipmentRateController.text));
|
||||||
return widget.custom.isChangedForEditCustomDuty(_customduty);
|
return this._custom.isChangedForEditCustomDuty(_customduty);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
import 'package:fcs/domain/entities/cargo_type.dart';
|
import 'package:fcs/domain/entities/cargo_type.dart';
|
||||||
import 'package:fcs/domain/entities/custom_duty.dart';
|
|
||||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/pages/delivery_address/delivery_address_editor.dart';
|
|
||||||
import 'package:fcs/pages/main/util.dart';
|
|
||||||
import 'package:fcs/pages/rates/custom_editor.dart';
|
import 'package:fcs/pages/rates/custom_editor.dart';
|
||||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@@ -14,8 +9,8 @@ import 'package:provider/provider.dart';
|
|||||||
import 'model/shipment_rate_model.dart';
|
import 'model/shipment_rate_model.dart';
|
||||||
|
|
||||||
class CustomList extends StatefulWidget {
|
class CustomList extends StatefulWidget {
|
||||||
final bool selected;
|
final bool? selected;
|
||||||
const CustomList({Key key, this.selected}) : super(key: key);
|
const CustomList({Key? key, this.selected}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
_CustomListState createState() => _CustomListState();
|
_CustomListState createState() => _CustomListState();
|
||||||
}
|
}
|
||||||
@@ -28,7 +23,7 @@ class _CustomListState extends State<CustomList> {
|
|||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.selected != null) {
|
if (widget.selected != null) {
|
||||||
_selected = widget.selected;
|
_selected = widget.selected!;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,13 @@ import 'package:fcs/helpers/theme.dart';
|
|||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
|
|
||||||
typedef SelectionCallback(CustomDuty custom);
|
typedef SelectionCallback(CustomDuty custom);
|
||||||
|
|
||||||
class CustomRow extends StatelessWidget {
|
class CustomRow extends StatelessWidget {
|
||||||
final CustomDuty custom;
|
final CustomDuty custom;
|
||||||
final SelectionCallback selectionCallback;
|
final SelectionCallback? selectionCallback;
|
||||||
const CustomRow({Key key, this.custom, this.selectionCallback})
|
const CustomRow({Key? key, required this.custom, this.selectionCallback})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -19,7 +18,7 @@ class CustomRow extends StatelessWidget {
|
|||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: selectionCallback == null
|
onTap: selectionCallback == null
|
||||||
? null
|
? null
|
||||||
: () => this.selectionCallback(custom),
|
: () => this.selectionCallback!(custom),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(
|
Expanded(
|
||||||
@@ -40,8 +39,8 @@ class CustomRow extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget line(BuildContext context, String text,
|
Widget line(BuildContext context, String? text,
|
||||||
{IconData iconData, Color color, double fontSize}) {
|
{IconData? iconData, Color? color, double? fontSize}) {
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
iconData == null
|
iconData == null
|
||||||
@@ -55,7 +54,7 @@ class CustomRow extends StatelessWidget {
|
|||||||
context,
|
context,
|
||||||
text ?? "",
|
text ?? "",
|
||||||
fontSize: fontSize ?? 14,
|
fontSize: fontSize ?? 14,
|
||||||
color: color,
|
color: color ?? Colors.grey,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -1,24 +1,16 @@
|
|||||||
import 'package:fcs/domain/entities/custom_duty.dart';
|
|
||||||
import 'package:fcs/domain/entities/discount.dart';
|
|
||||||
import 'package:fcs/domain/entities/discount_by_weight.dart';
|
import 'package:fcs/domain/entities/discount_by_weight.dart';
|
||||||
import 'package:fcs/domain/vo/delivery_address.dart';
|
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/pages/delivery_address/delivery_address_editor.dart';
|
|
||||||
import 'package:fcs/pages/main/util.dart';
|
|
||||||
import 'package:fcs/pages/rates/custom_editor.dart';
|
|
||||||
import 'package:fcs/pages/rates/discount_by_weight_editor.dart';
|
import 'package:fcs/pages/rates/discount_by_weight_editor.dart';
|
||||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import 'custom_row.dart';
|
|
||||||
import 'model/shipment_rate_model.dart';
|
import 'model/shipment_rate_model.dart';
|
||||||
|
|
||||||
class DiscountByWeightList extends StatefulWidget {
|
class DiscountByWeightList extends StatefulWidget {
|
||||||
const DiscountByWeightList({Key key}) : super(key: key);
|
const DiscountByWeightList({Key? key}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
_DiscountByWeightListState createState() => _DiscountByWeightListState();
|
_DiscountByWeightListState createState() => _DiscountByWeightListState();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class DiscountByWeightEditor extends StatefulWidget {
|
class DiscountByWeightEditor extends StatefulWidget {
|
||||||
final DiscountByWeight discountByWeight;
|
final DiscountByWeight? discountByWeight;
|
||||||
DiscountByWeightEditor({this.discountByWeight});
|
DiscountByWeightEditor({this.discountByWeight});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -23,14 +23,14 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
|
|||||||
TextEditingController _discountController = new TextEditingController();
|
TextEditingController _discountController = new TextEditingController();
|
||||||
|
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
bool _isNew;
|
bool _isNew = false;
|
||||||
DiscountByWeight _discountByWeight = new DiscountByWeight();
|
DiscountByWeight _discountByWeight = new DiscountByWeight();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
if (widget.discountByWeight != null) {
|
if (widget.discountByWeight != null) {
|
||||||
_discountByWeight = widget.discountByWeight;
|
_discountByWeight = widget.discountByWeight!;
|
||||||
_weightController.text = _discountByWeight.weight.toStringAsFixed(2);
|
_weightController.text = _discountByWeight.weight.toStringAsFixed(2);
|
||||||
_discountController.text = _discountByWeight.discount.toString();
|
_discountController.text = _discountByWeight.discount.toString();
|
||||||
_isNew = false;
|
_isNew = false;
|
||||||
@@ -73,7 +73,7 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
title: Text(AppTranslations.of(context).text("discount.new")),
|
title: Text(AppTranslations.of(context)!.text("discount.new")),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: Icon(Icons.delete),
|
icon: Icon(Icons.delete),
|
||||||
@@ -117,7 +117,7 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
|
|||||||
if (_isNew) {
|
if (_isNew) {
|
||||||
await shipmentRateModel.addDiscountByWeight(_discount);
|
await shipmentRateModel.addDiscountByWeight(_discount);
|
||||||
} else {
|
} else {
|
||||||
_discount.id = widget.discountByWeight.id;
|
_discount.id = this._discountByWeight.id;
|
||||||
await shipmentRateModel.updateDiscountByWeight(_discount);
|
await shipmentRateModel.updateDiscountByWeight(_discount);
|
||||||
}
|
}
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
@@ -143,7 +143,7 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
|
|||||||
var shipmentRateModel =
|
var shipmentRateModel =
|
||||||
Provider.of<ShipmentRateModel>(context, listen: false);
|
Provider.of<ShipmentRateModel>(context, listen: false);
|
||||||
await shipmentRateModel
|
await shipmentRateModel
|
||||||
.deleteDiscountByWeight(widget.discountByWeight.id);
|
.deleteDiscountByWeight(this._discountByWeight.id);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
@@ -161,7 +161,7 @@ class _DiscountByWeightEditorState extends State<DiscountByWeightEditor> {
|
|||||||
DiscountByWeight _discount = DiscountByWeight(
|
DiscountByWeight _discount = DiscountByWeight(
|
||||||
weight: double.parse(_weightController.text),
|
weight: double.parse(_weightController.text),
|
||||||
discount: double.parse(_discountController.text));
|
discount: double.parse(_discountController.text));
|
||||||
return widget.discountByWeight.isChangedForEdit(_discount);
|
return this._discountByWeight.isChangedForEdit(_discount);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import 'package:fcs/domain/entities/carton.dart';
|
|||||||
import 'package:fcs/domain/entities/cargo_type.dart';
|
import 'package:fcs/domain/entities/cargo_type.dart';
|
||||||
import 'package:fcs/domain/entities/rate.dart';
|
import 'package:fcs/domain/entities/rate.dart';
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/pages/main/util.dart';
|
|
||||||
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
||||||
import 'package:fcs/pages/widgets/display_text.dart';
|
import 'package:fcs/pages/widgets/display_text.dart';
|
||||||
import 'package:fcs/pages/widgets/input_text.dart';
|
import 'package:fcs/pages/widgets/input_text.dart';
|
||||||
@@ -12,7 +11,6 @@ import 'package:fcs/pages/widgets/local_text.dart';
|
|||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_icons/flutter_icons.dart';
|
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class ShipmentRatesCal extends StatefulWidget {
|
class ShipmentRatesCal extends StatefulWidget {
|
||||||
@@ -24,7 +22,7 @@ class ShipmentRatesCal extends StatefulWidget {
|
|||||||
|
|
||||||
class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
CargoType _cargoType;
|
late CargoType _cargoType;
|
||||||
TextEditingController _widthController = new TextEditingController();
|
TextEditingController _widthController = new TextEditingController();
|
||||||
TextEditingController _heightController = new TextEditingController();
|
TextEditingController _heightController = new TextEditingController();
|
||||||
TextEditingController _lengthController = new TextEditingController();
|
TextEditingController _lengthController = new TextEditingController();
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
import 'package:fcs/domain/entities/cargo_type.dart';
|
|
||||||
import 'package:fcs/domain/entities/custom_duty.dart';
|
|
||||||
import 'package:fcs/domain/entities/discount_by_weight.dart';
|
|
||||||
import 'package:fcs/domain/entities/rate.dart';
|
import 'package:fcs/domain/entities/rate.dart';
|
||||||
import 'package:fcs/helpers/theme.dart';
|
import 'package:fcs/helpers/theme.dart';
|
||||||
import 'package:fcs/localization/app_translations.dart';
|
import 'package:fcs/localization/app_translations.dart';
|
||||||
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
import 'package:fcs/pages/rates/model/shipment_rate_model.dart';
|
||||||
import 'package:fcs/pages/widgets/input_text.dart';
|
import 'package:fcs/pages/widgets/input_text.dart';
|
||||||
import 'package:fcs/pages/widgets/my_data_table.dart';
|
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
@@ -14,8 +10,6 @@ import 'package:font_awesome_flutter/font_awesome_flutter.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
||||||
import '../main/util.dart';
|
import '../main/util.dart';
|
||||||
import 'cargo_editor.dart';
|
|
||||||
import 'custom_editor.dart';
|
|
||||||
|
|
||||||
class ShipmentRatesEdit extends StatefulWidget {
|
class ShipmentRatesEdit extends StatefulWidget {
|
||||||
ShipmentRatesEdit();
|
ShipmentRatesEdit();
|
||||||
@@ -32,7 +26,7 @@ class _ShipmentRatesEditState extends State<ShipmentRatesEdit> {
|
|||||||
TextEditingController _diffDiscountWeight = new TextEditingController();
|
TextEditingController _diffDiscountWeight = new TextEditingController();
|
||||||
TextEditingController _diffWeightRate = new TextEditingController();
|
TextEditingController _diffWeightRate = new TextEditingController();
|
||||||
|
|
||||||
Rate rate;
|
late Rate rate;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -99,7 +93,7 @@ class _ShipmentRatesEditState extends State<ShipmentRatesEdit> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
backgroundColor: primaryColor,
|
backgroundColor: primaryColor,
|
||||||
title: Text(AppTranslations.of(context).text("rate.edit.title")),
|
title: Text(AppTranslations.of(context)!.text("rate.edit.title")),
|
||||||
),
|
),
|
||||||
body: Container(
|
body: Container(
|
||||||
padding: EdgeInsets.all(18),
|
padding: EdgeInsets.all(18),
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class RequestInvitationPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _RequestInvitationPageState extends State<RequestInvitationPage> {
|
class _RequestInvitationPageState extends State<RequestInvitationPage> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
TextEditingController nameCtl;
|
TextEditingController nameCtl = new TextEditingController();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:fcs/domain/entities/auth_result.dart';
|
|||||||
import 'package:fcs/domain/entities/auth_status.dart';
|
import 'package:fcs/domain/entities/auth_status.dart';
|
||||||
import 'package:fcs/pages/main/model/main_model.dart';
|
import 'package:fcs/pages/main/model/main_model.dart';
|
||||||
import 'package:fcs/pages/signin/signin_logic.dart';
|
import 'package:fcs/pages/signin/signin_logic.dart';
|
||||||
import 'package:fcs/pages/widgets/bottom_up_page_route.dart';
|
|
||||||
import 'package:fcs/pages/widgets/local_text.dart';
|
import 'package:fcs/pages/widgets/local_text.dart';
|
||||||
import 'package:fcs/pages/widgets/progress.dart';
|
import 'package:fcs/pages/widgets/progress.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
@@ -23,9 +22,9 @@ class SigninPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _SigninPageState extends State<SigninPage> {
|
class _SigninPageState extends State<SigninPage> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
String dialCode;
|
late String dialCode;
|
||||||
|
|
||||||
TextEditingController phonenumberCtl;
|
TextEditingController phonenumberCtl = new TextEditingController();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -82,7 +81,7 @@ class _SigninPageState extends State<SigninPage> {
|
|||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(color: Colors.grey[400], width: 1),
|
border: Border.all(color: Colors.grey.shade400, width: 1),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(12.0))),
|
borderRadius: BorderRadius.all(Radius.circular(12.0))),
|
||||||
child: CountryCodePicker(
|
child: CountryCodePicker(
|
||||||
onChanged: _countryChange,
|
onChanged: _countryChange,
|
||||||
@@ -152,7 +151,7 @@ class _SigninPageState extends State<SigninPage> {
|
|||||||
|
|
||||||
_countryChange(CountryCode countryCode) {
|
_countryChange(CountryCode countryCode) {
|
||||||
setState(() {
|
setState(() {
|
||||||
dialCode = countryCode.dialCode;
|
dialCode = countryCode.dialCode ?? '+95';
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class SignupPage extends StatefulWidget {
|
|||||||
|
|
||||||
class _SignupPageState extends State<SignupPage> {
|
class _SignupPageState extends State<SignupPage> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
TextEditingController nameCtl;
|
TextEditingController nameCtl = new TextEditingController();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|||||||
@@ -18,18 +18,19 @@ const resend_count_sec = 30;
|
|||||||
|
|
||||||
class SmsCodePage extends StatefulWidget {
|
class SmsCodePage extends StatefulWidget {
|
||||||
final String phoneNumber;
|
final String phoneNumber;
|
||||||
const SmsCodePage({Key key, this.phoneNumber}) : super(key: key);
|
const SmsCodePage({Key? key, required this.phoneNumber}) : super(key: key);
|
||||||
@override
|
@override
|
||||||
_SmsCodePageState createState() => _SmsCodePageState();
|
_SmsCodePageState createState() => _SmsCodePageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _SmsCodePageState extends State<SmsCodePage> {
|
class _SmsCodePageState extends State<SmsCodePage> {
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
String pin;
|
|
||||||
bool allNumberEntered;
|
|
||||||
Timer _timer;
|
|
||||||
int _start = resend_count_sec;
|
|
||||||
bool canResend = false;
|
bool canResend = false;
|
||||||
|
int _start = resend_count_sec;
|
||||||
|
|
||||||
|
late String pin;
|
||||||
|
late bool allNumberEntered;
|
||||||
|
late Timer _timer;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@@ -116,7 +117,7 @@ class _SmsCodePageState extends State<SmsCodePage> {
|
|||||||
pinLength: 6,
|
pinLength: 6,
|
||||||
decoration: BoxLooseDecoration(
|
decoration: BoxLooseDecoration(
|
||||||
strokeColorBuilder: PinListenColorBuilder(
|
strokeColorBuilder: PinListenColorBuilder(
|
||||||
primaryColor, Colors.grey[400])),
|
primaryColor, Colors.grey.shade400)),
|
||||||
textInputAction: TextInputAction.done,
|
textInputAction: TextInputAction.done,
|
||||||
autoFocus: true,
|
autoFocus: true,
|
||||||
onChanged: _pinChange,
|
onChanged: _pinChange,
|
||||||
@@ -133,13 +134,13 @@ class _SmsCodePageState extends State<SmsCodePage> {
|
|||||||
child: LocalText(context, 'sms.resend',
|
child: LocalText(context, 'sms.resend',
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color:
|
color:
|
||||||
canResend ? primaryColor : Colors.grey[400]),
|
canResend ? primaryColor : Colors.grey.shade400),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
side: BorderSide(
|
side: BorderSide(
|
||||||
color: canResend
|
color: canResend
|
||||||
? primaryColor
|
? primaryColor
|
||||||
: Colors.grey[400])),
|
: Colors.grey.shade400)),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: allNumberEntered ? _verify : null,
|
onTap: allNumberEntered ? _verify : null,
|
||||||
|
|||||||
Reference in New Issue
Block a user