upgrade packages
This commit is contained in:
@@ -35,11 +35,11 @@ android {
|
|||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSdkVersion 31
|
compileSdkVersion 33
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 33
|
||||||
versionCode flutterVersionCode.toInteger()
|
versionCode flutterVersionCode.toInteger()
|
||||||
versionName flutterVersionName
|
versionName flutterVersionName
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
@@ -76,7 +76,7 @@ android {
|
|||||||
signingConfig signingConfigs.release
|
signingConfig signingConfigs.release
|
||||||
|
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
useProguard false
|
// useProguard false
|
||||||
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,8 +7,10 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
classpath 'com.android.tools.build:gradle:7.1.0'
|
||||||
classpath 'com.google.gms:google-services:4.3.8'
|
classpath 'com.google.gms:google-services:4.3.10'
|
||||||
|
// classpath 'com.android.tools.build:gradle:4.1.0'
|
||||||
|
// classpath 'com.google.gms:google-services:4.3.8'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -26,7 +28,7 @@ subprojects {
|
|||||||
project.evaluationDependsOn(':app')
|
project.evaluationDependsOn(':app')
|
||||||
}
|
}
|
||||||
|
|
||||||
task clean(type: Delete) {
|
tasks.register("clean", Delete) {
|
||||||
delete rootProject.buildDir
|
delete rootProject.buildDir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
BIN
android/dev-key.keystore
Normal file
BIN
android/dev-key.keystore
Normal file
Binary file not shown.
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip
|
||||||
|
|||||||
@@ -16,13 +16,8 @@ final log = Logger('requestAPI');
|
|||||||
|
|
||||||
// request makes http request
|
// request makes http request
|
||||||
// if token is null
|
// if token is null
|
||||||
Future<dynamic> requestAPI(
|
Future<dynamic> requestAPI(String path, method,
|
||||||
String path,
|
{dynamic payload, String? token, String? url, int? networkTimeout}) async {
|
||||||
method, {
|
|
||||||
dynamic payload,
|
|
||||||
String? token,
|
|
||||||
String? url,
|
|
||||||
}) async {
|
|
||||||
DevInfo devInfo = await DevInfo.getDevInfo();
|
DevInfo devInfo = await DevInfo.getDevInfo();
|
||||||
|
|
||||||
String deviceName = "${devInfo.model}(${devInfo.id})";
|
String deviceName = "${devInfo.model}(${devInfo.id})";
|
||||||
@@ -40,8 +35,8 @@ Future<dynamic> requestAPI(
|
|||||||
BaseOptions options = new BaseOptions(
|
BaseOptions options = new BaseOptions(
|
||||||
method: method,
|
method: method,
|
||||||
baseUrl: url == null ? Config.instance.apiURL : url,
|
baseUrl: url == null ? Config.instance.apiURL : url,
|
||||||
connectTimeout: 10000,
|
connectTimeout: Duration(milliseconds: networkTimeout ?? 50000),
|
||||||
receiveTimeout: 60000,
|
receiveTimeout: Duration(milliseconds: networkTimeout ?? 50000),
|
||||||
headers: headers,
|
headers: headers,
|
||||||
);
|
);
|
||||||
log.info("baseUrl:${options.baseUrl}, path:$path");
|
log.info("baseUrl:${options.baseUrl}, path:$path");
|
||||||
|
|||||||
@@ -822,9 +822,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
double l = double.parse(_lengthController.text, (s) => 0);
|
double l = double.parse(_lengthController.text);
|
||||||
double w = double.parse(_widthController.text, (s) => 0);
|
double w = double.parse(_widthController.text);
|
||||||
double h = double.parse(_heightController.text, (s) => 0);
|
double h = double.parse(_heightController.text);
|
||||||
|
|
||||||
Carton carton = Carton();
|
Carton carton = Carton();
|
||||||
carton.id = _carton!.id;
|
carton.id = _carton!.id;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ class _TotalWeightEditState extends State<TotalWeightEdit> {
|
|||||||
_loading = true;
|
_loading = true;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
double total = double.parse(totalController.text, (s) => 0);
|
double total = double.parse(totalController.text);
|
||||||
Navigator.pop<double>(context, total);
|
Navigator.pop<double>(context, total);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
showMsgDialog(context, "Error", e.toString());
|
showMsgDialog(context, "Error", e.toString());
|
||||||
|
|||||||
@@ -100,9 +100,13 @@ class _CartonSizeEditorState extends State<CartonSizeEditor> {
|
|||||||
CartonSizeModel cartonSizeModel =
|
CartonSizeModel cartonSizeModel =
|
||||||
Provider.of<CartonSizeModel>(context, listen: false);
|
Provider.of<CartonSizeModel>(context, listen: false);
|
||||||
try {
|
try {
|
||||||
double l = double.parse(_lengthController.text, (s) => 0);
|
double l = double.parse(
|
||||||
double w = double.parse(_widthController.text, (s) => 0);
|
_lengthController.text,
|
||||||
double h = double.parse(_heightController.text, (s) => 0);
|
);
|
||||||
|
double w = double.parse(
|
||||||
|
_widthController.text,
|
||||||
|
);
|
||||||
|
double h = double.parse(_heightController.text);
|
||||||
|
|
||||||
if (_isNew) {
|
if (_isNew) {
|
||||||
CartonSize _cartonSize = CartonSize(
|
CartonSize _cartonSize = CartonSize(
|
||||||
@@ -178,9 +182,9 @@ class _CartonSizeEditorState extends State<CartonSizeEditor> {
|
|||||||
_widthController.text != "12" ||
|
_widthController.text != "12" ||
|
||||||
_heightController.text != "12";
|
_heightController.text != "12";
|
||||||
} else {
|
} else {
|
||||||
double l = double.parse(_lengthController.text, (s) => 0);
|
double l = double.parse(_lengthController.text);
|
||||||
double w = double.parse(_widthController.text, (s) => 0);
|
double w = double.parse(_widthController.text);
|
||||||
double h = double.parse(_heightController.text, (s) => 0);
|
double h = double.parse(_heightController.text);
|
||||||
CartonSize _cartonSize = CartonSize(
|
CartonSize _cartonSize = CartonSize(
|
||||||
name: _nameController.text, length: l, width: w, height: h);
|
name: _nameController.text, length: l, width: w, height: h);
|
||||||
|
|
||||||
|
|||||||
@@ -70,17 +70,29 @@ class Bubble extends StatelessWidget {
|
|||||||
? [
|
? [
|
||||||
FcsIDIcon(),
|
FcsIDIcon(),
|
||||||
getMsg(context, icon),
|
getMsg(context, icon),
|
||||||
FlatButton(
|
TextButton(
|
||||||
|
style: TextButton.styleFrom(
|
||||||
|
backgroundColor:Colors.blue[50],
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(10.0),
|
borderRadius: BorderRadius.circular(10.0),
|
||||||
),
|
)),
|
||||||
color: Colors.blue[50],
|
onPressed: () {},
|
||||||
onPressed: () => _viewDetail(),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
getLocalString(context, "message.view.detail"),
|
getLocalString(context, "message.view.detail"),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: primaryColor,
|
color: primaryColor,
|
||||||
fontWeight: FontWeight.bold)))
|
fontWeight: FontWeight.bold)))
|
||||||
|
// FlatButton(
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
|
// ),
|
||||||
|
// color: Colors.blue[50],
|
||||||
|
// onPressed: () => _viewDetail(),
|
||||||
|
// child: Text(
|
||||||
|
// getLocalString(context, "message.view.detail"),
|
||||||
|
// style: TextStyle(
|
||||||
|
// color: primaryColor,
|
||||||
|
// fontWeight: FontWeight.bold)))
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
Text(isCustomer ? "FCS Team" : sender ?? "",
|
Text(isCustomer ? "FCS Team" : sender ?? "",
|
||||||
|
|||||||
@@ -149,11 +149,15 @@ class _CustomerListState extends State<CustomerList> {
|
|||||||
customer.status == user_invited_status
|
customer.status == user_invited_status
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.only(right: 8.0),
|
padding: const EdgeInsets.only(right: 8.0),
|
||||||
child: FlatButton(
|
child: TextButton(
|
||||||
onPressed: () => _share(customer),
|
onPressed: () => _share(customer),
|
||||||
|
style: TextButton.styleFrom(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(18.0),
|
borderRadius: BorderRadius.circular(18.0),
|
||||||
side: BorderSide(color: primaryColor)),
|
side: BorderSide(color: primaryColor))),
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(18.0),
|
||||||
|
// side: BorderSide(color: primaryColor)),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
|
|||||||
@@ -113,9 +113,9 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_calShipmentWeight() {
|
_calShipmentWeight() {
|
||||||
double l = double.parse(_lengthController.text, (s) => 0);
|
double l = double.parse(_lengthController.text);
|
||||||
double w = double.parse(_widthController.text, (s) => 0);
|
double w = double.parse(_widthController.text);
|
||||||
double h = double.parse(_heightController.text, (s) => 0);
|
double h = double.parse(_heightController.text);
|
||||||
setState(() {
|
setState(() {
|
||||||
shipmentWeight = l * w * h / volumetricRatio;
|
shipmentWeight = l * w * h / volumetricRatio;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -197,10 +197,7 @@ class _FAQEditorState extends State<FAQEditor> {
|
|||||||
_isLoading = true;
|
_isLoading = true;
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
int sn = int.parse(
|
int sn = int.parse(_sn.text);
|
||||||
_sn.text,
|
|
||||||
onError: (source) => throw Exception("Invalid number"),
|
|
||||||
);
|
|
||||||
FAQModel faqModel = Provider.of<FAQModel>(context, listen: false);
|
FAQModel faqModel = Provider.of<FAQModel>(context, listen: false);
|
||||||
FAQ _faq = FAQ(
|
FAQ _faq = FAQ(
|
||||||
sn: sn,
|
sn: sn,
|
||||||
|
|||||||
@@ -143,8 +143,9 @@ class _FAQListPageState extends State<FAQListPage>
|
|||||||
: Row(
|
: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
FlatButton(
|
TextButton(
|
||||||
color: primaryColor,
|
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||||
|
// color: primaryColor,
|
||||||
onPressed: () => _selectLinkPage(linkPage),
|
onPressed: () => _selectLinkPage(linkPage),
|
||||||
child: LocalText(context, "", text: text, color: Colors.white),
|
child: LocalText(context, "", text: text, color: Colors.white),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -76,10 +76,15 @@ class _BoxAdditionState extends State<BoxAddition> {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 250,
|
width: 250,
|
||||||
child: FlatButton(
|
child: TextButton(
|
||||||
child: Text('Add box'),
|
style: TextButton.styleFrom(
|
||||||
color: primaryColor,
|
backgroundColor: primaryColor),
|
||||||
textColor: Colors.white,
|
child: Text(
|
||||||
|
'Add box',
|
||||||
|
style: TextStyle(color: Colors.white),
|
||||||
|
),
|
||||||
|
// color: primaryColor,
|
||||||
|
// textColor: Colors.white,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
@@ -90,10 +95,13 @@ class _BoxAdditionState extends State<BoxAddition> {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 250,
|
width: 250,
|
||||||
child: FlatButton(
|
child: TextButton(
|
||||||
child: Text('Save box'),
|
style: TextButton.styleFrom(
|
||||||
color: primaryColor,
|
backgroundColor: primaryColor),
|
||||||
textColor: Colors.white,
|
child: Text('Save box',
|
||||||
|
style: TextStyle(color: Colors.white)),
|
||||||
|
// color: primaryColor,
|
||||||
|
// textColor: Colors.white,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ class InvoiceListRow extends StatelessWidget {
|
|||||||
? Padding(
|
? Padding(
|
||||||
padding: const EdgeInsets.only(left: 10.0),
|
padding: const EdgeInsets.only(left: 10.0),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
child: RaisedButton(
|
child: ElevatedButton(
|
||||||
child: Row(
|
child: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Icon(
|
Icon(
|
||||||
|
|||||||
@@ -148,12 +148,12 @@ class _HomePageState extends State<HomePage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_initLocalNotifications() {
|
_initLocalNotifications() {
|
||||||
var initializationSettingsAndroid =
|
// var initializationSettingsAndroid =
|
||||||
new AndroidInitializationSettings('@mipmap/ic_launcher');
|
// new AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||||
var initializationSettingsIOS = new IOSInitializationSettings();
|
// var initializationSettingsIOS = new IOSInitializationSettings();
|
||||||
var initializationSettings = new InitializationSettings(
|
// var initializationSettings = new InitializationSettings(
|
||||||
android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
|
// android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
|
||||||
_flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
// _flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Future _showNotification(Map<String, dynamic> message) async {
|
static Future _showNotification(Map<String, dynamic> message) async {
|
||||||
@@ -176,29 +176,29 @@ class _HomePageState extends State<HomePage> {
|
|||||||
print("AppPushs params pushAction : $action");
|
print("AppPushs params pushAction : $action");
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
var platformChannelSpecificsAndroid = new AndroidNotificationDetails(
|
// var platformChannelSpecificsAndroid = new AndroidNotificationDetails(
|
||||||
'your channel id', 'your channel name', 'your channel description',
|
// 'your channel id', 'your channel name', 'your channel description',
|
||||||
playSound: true,
|
// playSound: true,
|
||||||
enableVibration: true,
|
// enableVibration: true,
|
||||||
importance: Importance.max,
|
// importance: Importance.max,
|
||||||
priority: Priority.high);
|
// priority: Priority.high);
|
||||||
|
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
var platformChannelSpecificsIos =
|
// var platformChannelSpecificsIos =
|
||||||
new IOSNotificationDetails(presentSound: true);
|
// new IOSNotificationDetails(presentSound: true);
|
||||||
var platformChannelSpecifics = new NotificationDetails(
|
// var platformChannelSpecifics = new NotificationDetails(
|
||||||
android: platformChannelSpecificsAndroid,
|
// android: platformChannelSpecificsAndroid,
|
||||||
iOS: platformChannelSpecificsIos);
|
// iOS: platformChannelSpecificsIos);
|
||||||
|
|
||||||
new Future.delayed(Duration.zero, () {
|
// new Future.delayed(Duration.zero, () {
|
||||||
_flutterLocalNotificationsPlugin.show(
|
// _flutterLocalNotificationsPlugin.show(
|
||||||
0,
|
// 0,
|
||||||
pushTitle,
|
// pushTitle,
|
||||||
pushText,
|
// pushText,
|
||||||
platformChannelSpecifics,
|
// platformChannelSpecifics,
|
||||||
payload: 'No_Sound',
|
// payload: 'No_Sound',
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
void dispose() {
|
void dispose() {
|
||||||
@@ -387,7 +387,7 @@ class _HomePageState extends State<HomePage> {
|
|||||||
isSelected: languageModel.currentState,
|
isSelected: languageModel.currentState,
|
||||||
selectedBorderColor: Colors.white24,
|
selectedBorderColor: Colors.white24,
|
||||||
);
|
);
|
||||||
final signinBtn = FlatButton(
|
final signinBtn = TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context)
|
Navigator.of(context)
|
||||||
.push(CupertinoPageRoute(builder: (context) => SigninPage()));
|
.push(CupertinoPageRoute(builder: (context) => SigninPage()));
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Future showMsgDialog(BuildContext context, String title, String msg) {
|
|||||||
title: new Text(title),
|
title: new Text(title),
|
||||||
content: new Text(msg),
|
content: new Text(msg),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
new FlatButton(
|
new TextButton(
|
||||||
child: new Text("Close"),
|
child: new Text("Close"),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
@@ -51,8 +51,10 @@ Future<void> showConfirmDialog(
|
|||||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
FlatButton(
|
TextButton(
|
||||||
color: Colors.grey[300],
|
style:
|
||||||
|
TextButton.styleFrom(backgroundColor: Colors.grey[300]),
|
||||||
|
// color: Colors.grey[300],
|
||||||
child: Text(
|
child: Text(
|
||||||
AppTranslations.of(context)!.text('btn.cancel'),
|
AppTranslations.of(context)!.text('btn.cancel'),
|
||||||
style: Provider.of<LanguageModel>(context).isEng
|
style: Provider.of<LanguageModel>(context).isEng
|
||||||
@@ -65,8 +67,9 @@ Future<void> showConfirmDialog(
|
|||||||
SizedBox(
|
SizedBox(
|
||||||
width: 0,
|
width: 0,
|
||||||
),
|
),
|
||||||
FlatButton(
|
TextButton(
|
||||||
color: primaryColor,
|
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||||
|
// color: primaryColor,
|
||||||
child: Text(AppTranslations.of(context)!.text('btn.ok'),
|
child: Text(AppTranslations.of(context)!.text('btn.ok'),
|
||||||
style: Provider.of<LanguageModel>(context).isEng
|
style: Provider.of<LanguageModel>(context).isEng
|
||||||
? TextStyle(
|
? TextStyle(
|
||||||
@@ -343,7 +346,7 @@ Widget fcsButton(BuildContext context, String text,
|
|||||||
child: ButtonTheme(
|
child: ButtonTheme(
|
||||||
minWidth: 900.0,
|
minWidth: 900.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
child: FlatButton(
|
child: TextButton(
|
||||||
onPressed: callack == null ? null : () => callack(),
|
onPressed: callack == null ? null : () => callack(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -371,7 +374,7 @@ String getLocalString(BuildContext context, String key) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void showToast(GlobalKey key, String text) {
|
void showToast(GlobalKey key, String text) {
|
||||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
final ScaffoldMessengerState scaffold = key.currentState as ScaffoldMessengerState;
|
||||||
scaffold.showSnackBar(
|
scaffold.showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(text),
|
content: Text(text),
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
|||||||
onPressed: _langChange,
|
onPressed: _langChange,
|
||||||
isSelected: isSelected,
|
isSelected: isSelected,
|
||||||
),
|
),
|
||||||
FlatButton(
|
TextButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).push(CupertinoPageRoute(
|
Navigator.of(context).push(CupertinoPageRoute(
|
||||||
builder: (context) => SigninPage()));
|
builder: (context) => SigninPage()));
|
||||||
|
|||||||
@@ -166,12 +166,12 @@ class _MarketEditorState extends State<MarketEditor> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
new FlatButton(
|
new TextButton(
|
||||||
child: LocalText(context, "btn.cancel", color: primaryColor),
|
child: LocalText(context, "btn.cancel", color: primaryColor),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
}),
|
}),
|
||||||
new FlatButton(
|
new TextButton(
|
||||||
child: LocalText(
|
child: LocalText(
|
||||||
context,
|
context,
|
||||||
"btn.save",
|
"btn.save",
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class PaymentMethodPage extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _PaymentMethodPageState extends State<PaymentMethodPage> {
|
class _PaymentMethodPageState extends State<PaymentMethodPage> {
|
||||||
GlobalKey key = GlobalKey();
|
GlobalKey<ScaffoldMessengerState> key = GlobalKey<ScaffoldMessengerState>();
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@@ -153,7 +153,8 @@ class _PaymentMethodPageState extends State<PaymentMethodPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void _showToast(String title) {
|
void _showToast(String title) {
|
||||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
final ScaffoldMessengerState scaffold =
|
||||||
|
key.currentState as ScaffoldMessengerState;
|
||||||
scaffold.showSnackBar(
|
scaffold.showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text('copied "$title" data to clipboard'),
|
content: Text('copied "$title" data to clipboard'),
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class Profile extends StatefulWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _ProfileState extends State<Profile> {
|
class _ProfileState extends State<Profile> {
|
||||||
GlobalKey key = GlobalKey();
|
GlobalKey<ScaffoldMessengerState> key = GlobalKey<ScaffoldMessengerState>();
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
String? selectedLanguage;
|
String? selectedLanguage;
|
||||||
TextEditingController bizNameController = new TextEditingController();
|
TextEditingController bizNameController = new TextEditingController();
|
||||||
@@ -275,7 +275,8 @@ class _ProfileState extends State<Profile> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_showToast(String title) {
|
_showToast(String title) {
|
||||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
final ScaffoldMessengerState scaffold =
|
||||||
|
key.currentState as ScaffoldMessengerState;
|
||||||
scaffold.showSnackBar(
|
scaffold.showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text('copied "$title" data to clipboard'),
|
content: Text('copied "$title" data to clipboard'),
|
||||||
@@ -302,7 +303,8 @@ class _ProfileState extends State<Profile> {
|
|||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
await context.read<MainModel>().signout();
|
await context.read<MainModel>().signout();
|
||||||
} catch (e) {} finally {
|
} catch (e) {
|
||||||
|
} finally {
|
||||||
Future.delayed(Duration(seconds: 1), () {
|
Future.delayed(Duration(seconds: 1), () {
|
||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -53,9 +53,9 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
|||||||
_calShipmentWeight() {
|
_calShipmentWeight() {
|
||||||
Rate rate = Provider.of<ShipmentRateModel>(context, listen: false).rate;
|
Rate rate = Provider.of<ShipmentRateModel>(context, listen: false).rate;
|
||||||
|
|
||||||
double l = double.parse(_lengthController.text, (s) => 0);
|
double l = double.parse(_lengthController.text);
|
||||||
double w = double.parse(_widthController.text, (s) => 0);
|
double w = double.parse(_widthController.text);
|
||||||
double h = double.parse(_heightController.text, (s) => 0);
|
double h = double.parse(_heightController.text);
|
||||||
_cargoType.weight = double.tryParse(_actualWeightCtl.text) ?? 0;
|
_cargoType.weight = double.tryParse(_actualWeightCtl.text) ?? 0;
|
||||||
Carton box =
|
Carton box =
|
||||||
Carton(cargoTypes: [_cargoType], length: l, width: w, height: h);
|
Carton(cargoTypes: [_cargoType], length: l, width: w, height: h);
|
||||||
|
|||||||
@@ -72,9 +72,9 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_calShipmentWeight() {
|
_calShipmentWeight() {
|
||||||
double l = double.parse(_lengthCtl.text, (s) => 0);
|
double l = double.parse(_lengthCtl.text);
|
||||||
double w = double.parse(_widthCtl.text, (s) => 0);
|
double w = double.parse(_widthCtl.text);
|
||||||
double h = double.parse(_heightCtl.text, (s) => 0);
|
double h = double.parse(_heightCtl.text);
|
||||||
setState(() {
|
setState(() {
|
||||||
shipmentWeight = (l * w * h / volumetricRatio).ceilToDouble();
|
shipmentWeight = (l * w * h / volumetricRatio).ceilToDouble();
|
||||||
});
|
});
|
||||||
@@ -296,9 +296,9 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_creatCarton() {
|
_creatCarton() {
|
||||||
double l = double.parse(_lengthCtl.text, (s) => 0);
|
double l = double.parse(_lengthCtl.text);
|
||||||
double w = double.parse(_widthCtl.text, (s) => 0);
|
double w = double.parse(_widthCtl.text);
|
||||||
double h = double.parse(_heightCtl.text, (s) => 0);
|
double h = double.parse(_heightCtl.text);
|
||||||
_box!.length = l;
|
_box!.length = l;
|
||||||
_box!.width = w;
|
_box!.width = w;
|
||||||
_box!.height = h;
|
_box!.height = h;
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ class _RequestInvitationPageState extends State<RequestInvitationPage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: _request,
|
onPressed: _request,
|
||||||
child: Text(getLocalString(context, "invite.request")),
|
child: Text(getLocalString(context, "invite.request")),
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -128,19 +128,29 @@ class _SmsCodePageState extends State<SmsCodePage> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
RaisedButton(
|
ElevatedButton(
|
||||||
onPressed: canResend ? _resend : null,
|
style: ElevatedButton.styleFrom(
|
||||||
color: canResend ? Colors.white : Colors.grey,
|
backgroundColor:
|
||||||
child: LocalText(context, 'sms.resend',
|
canResend ? Colors.white : Colors.grey,
|
||||||
fontSize: 16,
|
|
||||||
color:
|
|
||||||
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.shade400)),
|
: Colors.grey.shade400))),
|
||||||
|
onPressed: canResend ? _resend : null,
|
||||||
|
// color: canResend ? Colors.white : Colors.grey,
|
||||||
|
child: LocalText(context, 'sms.resend',
|
||||||
|
fontSize: 16,
|
||||||
|
color: canResend
|
||||||
|
? primaryColor
|
||||||
|
: Colors.grey.shade400),
|
||||||
|
// shape: RoundedRectangleBorder(
|
||||||
|
// borderRadius: BorderRadius.circular(10.0),
|
||||||
|
// side: BorderSide(
|
||||||
|
// color: canResend
|
||||||
|
// ? primaryColor
|
||||||
|
// : Colors.grey.shade400)),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: allNumberEntered ? _verify : null,
|
onTap: allNumberEntered ? _verify : null,
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ class _DialogInputState extends State<DialogInput> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
FlatButton(
|
TextButton(
|
||||||
child: LocalText(
|
child: LocalText(
|
||||||
context,
|
context,
|
||||||
'btn.cancel',
|
'btn.cancel',
|
||||||
@@ -68,8 +68,9 @@ class _DialogInputState extends State<DialogInput> {
|
|||||||
_controller.clear();
|
_controller.clear();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
}),
|
}),
|
||||||
FlatButton(
|
TextButton(
|
||||||
color: primaryColor,
|
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||||
|
// color: primaryColor,
|
||||||
child: LocalText(
|
child: LocalText(
|
||||||
context,
|
context,
|
||||||
'btn.ok',
|
'btn.ok',
|
||||||
|
|||||||
@@ -32,7 +32,9 @@ class _FcsExpansionTileState extends State<FcsExpansionTile> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Theme(
|
return Theme(
|
||||||
data: ThemeData(
|
data: ThemeData(
|
||||||
accentColor: primaryColor, dividerColor: Colors.transparent),
|
dividerColor: Colors.transparent,
|
||||||
|
colorScheme:
|
||||||
|
ColorScheme.fromSwatch().copyWith(secondary: primaryColor)),
|
||||||
child: ExpansionTile(
|
child: ExpansionTile(
|
||||||
onExpansionChanged: (value) {
|
onExpansionChanged: (value) {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class _LengthPickerState extends State<LengthPicker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_setText() {
|
_setText() {
|
||||||
double v = double.parse(widget.controller!.text, (s) => 0);
|
double v = double.parse(widget.controller!.text);
|
||||||
int _v = v.toInt();
|
int _v = v.toInt();
|
||||||
|
|
||||||
int f = (v / 12).floor();
|
int f = (v / 12).floor();
|
||||||
@@ -107,7 +107,7 @@ class _LengthPickerDialogState extends State<LengthPickerDialog> {
|
|||||||
_valueFeet = 0;
|
_valueFeet = 0;
|
||||||
_valueInc = 0;
|
_valueInc = 0;
|
||||||
if (widget.controller != null) {
|
if (widget.controller != null) {
|
||||||
double v = double.parse(widget.controller!.text, (s) => 0);
|
double v = double.parse(widget.controller!.text);
|
||||||
_valueFeet = (v / 12).floor();
|
_valueFeet = (v / 12).floor();
|
||||||
_valueInc = widget.displayFeet! ? (v % 12).toInt() : v.toInt();
|
_valueInc = widget.displayFeet! ? (v % 12).toInt() : v.toInt();
|
||||||
inchInputController.text = _valueInc.toString();
|
inchInputController.text = _valueInc.toString();
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class LocalButton extends StatelessWidget {
|
|||||||
child: ButtonTheme(
|
child: ButtonTheme(
|
||||||
minWidth: 900.0,
|
minWidth: 900.0,
|
||||||
height: 100.0,
|
height: 100.0,
|
||||||
child: FlatButton(
|
child: TextButton(
|
||||||
onPressed: callBack == null ? null : () => callBack!(),
|
onPressed: callBack == null ? null : () => callBack!(),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ class _MultiImageFileState extends State<MultiImageFile> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_openImagePicker(bool camera) async {
|
_openImagePicker(bool camera) async {
|
||||||
var selectedFile = await ImagePicker().getImage(
|
var selectedFile = await ImagePicker().pickImage(
|
||||||
source: camera ? ImageSource.camera : ImageSource.gallery,
|
source: camera ? ImageSource.camera : ImageSource.gallery,
|
||||||
imageQuality: 80,
|
imageQuality: 80,
|
||||||
maxWidth: 1000);
|
maxWidth: 1000);
|
||||||
@@ -213,7 +213,7 @@ class _MultiImageFileState extends State<MultiImageFile> {
|
|||||||
await _dialog(
|
await _dialog(
|
||||||
context, () => camera = true, () => gallery = true);
|
context, () => camera = true, () => gallery = true);
|
||||||
if (camera || gallery) {
|
if (camera || gallery) {
|
||||||
var selectedFile = await ImagePicker().getImage(
|
var selectedFile = await ImagePicker().pickImage(
|
||||||
source: camera ? ImageSource.camera : ImageSource.gallery,
|
source: camera ? ImageSource.camera : ImageSource.gallery,
|
||||||
imageQuality: 80,
|
imageQuality: 80,
|
||||||
maxWidth: 1000);
|
maxWidth: 1000);
|
||||||
|
|||||||
@@ -773,14 +773,14 @@ class TableRowInkWell extends InkResponse {
|
|||||||
RectCallback getRectCallback(RenderBox referenceBox) {
|
RectCallback getRectCallback(RenderBox referenceBox) {
|
||||||
return () {
|
return () {
|
||||||
RenderObject cell = referenceBox;
|
RenderObject cell = referenceBox;
|
||||||
AbstractNode? table = cell.parent;
|
RenderObject? table = cell.parent;
|
||||||
final Matrix4 transform = Matrix4.identity();
|
final Matrix4 transform = Matrix4.identity();
|
||||||
while (table is RenderObject && table is! RenderTable) {
|
while (table is RenderObject && table is! RenderTable) {
|
||||||
final RenderObject parentBox = table as RenderObject;
|
final RenderObject parentBox = table;
|
||||||
parentBox.applyPaintTransform(cell, transform);
|
parentBox.applyPaintTransform(cell, transform);
|
||||||
assert(table == cell.parent);
|
assert(table == cell.parent);
|
||||||
cell = parentBox;
|
cell = parentBox;
|
||||||
table = table.parent;
|
table = table?.parent;
|
||||||
}
|
}
|
||||||
if (table is RenderTable) {
|
if (table is RenderTable) {
|
||||||
final TableCellParentData cellParentData =
|
final TableCellParentData cellParentData =
|
||||||
|
|||||||
35
pubspec.yaml
35
pubspec.yaml
@@ -13,46 +13,47 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
|
|
||||||
cupertino_icons: ^1.0.3
|
cupertino_icons: ^1.0.3
|
||||||
firebase_core: ^1.6.0
|
|
||||||
cloud_firestore: ^2.5.2
|
firebase_core: ^2.17.0
|
||||||
firebase_storage: ^10.0.3
|
firebase_auth: ^4.10.1
|
||||||
firebase_auth: ^3.1.1
|
cloud_firestore: ^4.9.3
|
||||||
firebase_messaging: ^10.0.7
|
firebase_storage: ^11.5.6
|
||||||
|
firebase_messaging: ^14.6.9
|
||||||
|
|
||||||
provider: ^6.0.0
|
provider: ^6.0.0
|
||||||
image_picker: ^0.8.3+3
|
image_picker: ^1.0.6
|
||||||
shared_preferences: ^2.0.7
|
shared_preferences: ^2.0.7
|
||||||
progress:
|
progress:
|
||||||
path:
|
path:
|
||||||
../mokkon-flutter/packages/progress
|
../mokkon-flutter/packages/progress
|
||||||
flutter_datetime_picker: ^1.5.1
|
flutter_datetime_picker: ^1.5.1
|
||||||
dio: ^4.0.0
|
dio: ^5.4.0
|
||||||
package_info: ^2.0.2
|
package_info: ^2.0.2
|
||||||
google_api_availability: ^3.0.1
|
google_api_availability: ^5.0.0
|
||||||
intl: ^0.17.0
|
intl: ^0.18.1
|
||||||
font_awesome_flutter: ^9.1.0
|
font_awesome_flutter: ^10.6.0
|
||||||
photo_view: ^0.12.0
|
photo_view: ^0.14.0
|
||||||
uuid: ^3.0.4
|
uuid: ^4.2.2
|
||||||
zefyrka: ^1.0.10
|
zefyrka: ^1.0.10
|
||||||
path_provider: ^2.0.2
|
path_provider: ^2.0.2
|
||||||
camera: ^0.9.0
|
camera: ^0.10.5+8
|
||||||
url_launcher: ^6.0.9
|
url_launcher: ^6.0.9
|
||||||
device_info: ^2.0.2
|
device_info: ^2.0.2
|
||||||
connectivity: ^3.0.6
|
connectivity: ^3.0.6
|
||||||
logging: ^1.0.1
|
logging: ^1.0.1
|
||||||
permission_handler: ^8.1.4+2
|
permission_handler: ^11.1.0
|
||||||
country_code_picker: ^2.0.2
|
country_code_picker: ^3.0.0
|
||||||
pin_input_text_field: ^4.1.0
|
pin_input_text_field: ^4.1.0
|
||||||
flutter_icons_null_safety: ^1.1.0
|
flutter_icons_null_safety: ^1.1.0
|
||||||
country_icons: ^2.0.2
|
country_icons: ^2.0.2
|
||||||
timeline_list: ^0.0.5
|
timeline_list: ^0.0.5
|
||||||
barcode_scan2: ^4.1.4
|
barcode_scan2: ^4.1.4
|
||||||
flutter_pdfview: ^1.2.1
|
flutter_pdfview: ^1.2.1
|
||||||
flutter_local_notifications: ^8.2.0
|
flutter_local_notifications: ^16.3.0
|
||||||
share: ^2.0.4
|
share: ^2.0.4
|
||||||
cached_network_image: ^3.1.0
|
cached_network_image: ^3.1.0
|
||||||
flutter_cache_manager: ^3.1.2
|
flutter_cache_manager: ^3.1.2
|
||||||
flutter_vector_icons: ^1.0.0
|
flutter_vector_icons: ^2.0.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
Reference in New Issue
Block a user