upgrade packages
This commit is contained in:
@@ -16,13 +16,8 @@ final log = Logger('requestAPI');
|
||||
|
||||
// request makes http request
|
||||
// if token is null
|
||||
Future<dynamic> requestAPI(
|
||||
String path,
|
||||
method, {
|
||||
dynamic payload,
|
||||
String? token,
|
||||
String? url,
|
||||
}) async {
|
||||
Future<dynamic> requestAPI(String path, method,
|
||||
{dynamic payload, String? token, String? url, int? networkTimeout}) async {
|
||||
DevInfo devInfo = await DevInfo.getDevInfo();
|
||||
|
||||
String deviceName = "${devInfo.model}(${devInfo.id})";
|
||||
@@ -33,15 +28,15 @@ Future<dynamic> requestAPI(
|
||||
headers["Token"] = token;
|
||||
}
|
||||
if (devInfo != null && devInfo.deviceID != null && deviceName != null) {
|
||||
headers["Device"] = devInfo.deviceID??"" + ":" + deviceName;
|
||||
headers["Device"] = devInfo.deviceID ?? "" + ":" + deviceName;
|
||||
}
|
||||
headers["Project-ID"] = Config.instance.reportProjectID;
|
||||
|
||||
BaseOptions options = new BaseOptions(
|
||||
method: method,
|
||||
baseUrl: url == null ? Config.instance.apiURL : url,
|
||||
connectTimeout: 10000,
|
||||
receiveTimeout: 60000,
|
||||
connectTimeout: Duration(milliseconds: networkTimeout ?? 50000),
|
||||
receiveTimeout: Duration(milliseconds: networkTimeout ?? 50000),
|
||||
headers: headers,
|
||||
);
|
||||
log.info("baseUrl:${options.baseUrl}, path:$path");
|
||||
|
||||
@@ -822,9 +822,9 @@ class _CartonEditorState extends State<CartonEditor> {
|
||||
return;
|
||||
}
|
||||
|
||||
double l = double.parse(_lengthController.text, (s) => 0);
|
||||
double w = double.parse(_widthController.text, (s) => 0);
|
||||
double h = double.parse(_heightController.text, (s) => 0);
|
||||
double l = double.parse(_lengthController.text);
|
||||
double w = double.parse(_widthController.text);
|
||||
double h = double.parse(_heightController.text);
|
||||
|
||||
Carton carton = Carton();
|
||||
carton.id = _carton!.id;
|
||||
|
||||
@@ -73,7 +73,7 @@ class _TotalWeightEditState extends State<TotalWeightEdit> {
|
||||
_loading = true;
|
||||
});
|
||||
try {
|
||||
double total = double.parse(totalController.text, (s) => 0);
|
||||
double total = double.parse(totalController.text);
|
||||
Navigator.pop<double>(context, total);
|
||||
} catch (e) {
|
||||
showMsgDialog(context, "Error", e.toString());
|
||||
|
||||
@@ -100,9 +100,13 @@ class _CartonSizeEditorState extends State<CartonSizeEditor> {
|
||||
CartonSizeModel cartonSizeModel =
|
||||
Provider.of<CartonSizeModel>(context, listen: false);
|
||||
try {
|
||||
double l = double.parse(_lengthController.text, (s) => 0);
|
||||
double w = double.parse(_widthController.text, (s) => 0);
|
||||
double h = double.parse(_heightController.text, (s) => 0);
|
||||
double l = double.parse(
|
||||
_lengthController.text,
|
||||
);
|
||||
double w = double.parse(
|
||||
_widthController.text,
|
||||
);
|
||||
double h = double.parse(_heightController.text);
|
||||
|
||||
if (_isNew) {
|
||||
CartonSize _cartonSize = CartonSize(
|
||||
@@ -178,9 +182,9 @@ class _CartonSizeEditorState extends State<CartonSizeEditor> {
|
||||
_widthController.text != "12" ||
|
||||
_heightController.text != "12";
|
||||
} else {
|
||||
double l = double.parse(_lengthController.text, (s) => 0);
|
||||
double w = double.parse(_widthController.text, (s) => 0);
|
||||
double h = double.parse(_heightController.text, (s) => 0);
|
||||
double l = double.parse(_lengthController.text);
|
||||
double w = double.parse(_widthController.text);
|
||||
double h = double.parse(_heightController.text);
|
||||
CartonSize _cartonSize = CartonSize(
|
||||
name: _nameController.text, length: l, width: w, height: h);
|
||||
|
||||
|
||||
@@ -70,17 +70,29 @@ class Bubble extends StatelessWidget {
|
||||
? [
|
||||
FcsIDIcon(),
|
||||
getMsg(context, icon),
|
||||
FlatButton(
|
||||
shape: RoundedRectangleBorder(
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor:Colors.blue[50],
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
),
|
||||
color: Colors.blue[50],
|
||||
onPressed: () => _viewDetail(),
|
||||
)),
|
||||
onPressed: () {},
|
||||
child: Text(
|
||||
getLocalString(context, "message.view.detail"),
|
||||
style: TextStyle(
|
||||
color: primaryColor,
|
||||
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 ?? "",
|
||||
|
||||
@@ -149,11 +149,15 @@ class _CustomerListState extends State<CustomerList> {
|
||||
customer.status == user_invited_status
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(right: 8.0),
|
||||
child: FlatButton(
|
||||
child: TextButton(
|
||||
onPressed: () => _share(customer),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
side: BorderSide(color: primaryColor)),
|
||||
style: TextButton.styleFrom(
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(18.0),
|
||||
side: BorderSide(color: primaryColor))),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(18.0),
|
||||
// side: BorderSide(color: primaryColor)),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
|
||||
@@ -113,9 +113,9 @@ class _DeliveryInfoState extends State<DeliveryInfo> {
|
||||
}
|
||||
|
||||
_calShipmentWeight() {
|
||||
double l = double.parse(_lengthController.text, (s) => 0);
|
||||
double w = double.parse(_widthController.text, (s) => 0);
|
||||
double h = double.parse(_heightController.text, (s) => 0);
|
||||
double l = double.parse(_lengthController.text);
|
||||
double w = double.parse(_widthController.text);
|
||||
double h = double.parse(_heightController.text);
|
||||
setState(() {
|
||||
shipmentWeight = l * w * h / volumetricRatio;
|
||||
});
|
||||
|
||||
@@ -92,10 +92,10 @@ class _FAQEditorState extends State<FAQEditor> {
|
||||
color: primaryColor,
|
||||
),
|
||||
onChanged: (String? newValue) {
|
||||
if(newValue != null)
|
||||
setState(() {
|
||||
_pageLink = newValue;
|
||||
});
|
||||
if (newValue != null)
|
||||
setState(() {
|
||||
_pageLink = newValue;
|
||||
});
|
||||
},
|
||||
items: <String>[
|
||||
info,
|
||||
@@ -197,10 +197,7 @@ class _FAQEditorState extends State<FAQEditor> {
|
||||
_isLoading = true;
|
||||
});
|
||||
try {
|
||||
int sn = int.parse(
|
||||
_sn.text,
|
||||
onError: (source) => throw Exception("Invalid number"),
|
||||
);
|
||||
int sn = int.parse(_sn.text);
|
||||
FAQModel faqModel = Provider.of<FAQModel>(context, listen: false);
|
||||
FAQ _faq = FAQ(
|
||||
sn: sn,
|
||||
|
||||
@@ -143,8 +143,9 @@ class _FAQListPageState extends State<FAQListPage>
|
||||
: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
FlatButton(
|
||||
color: primaryColor,
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||
// color: primaryColor,
|
||||
onPressed: () => _selectLinkPage(linkPage),
|
||||
child: LocalText(context, "", text: text, color: Colors.white),
|
||||
)
|
||||
|
||||
@@ -76,10 +76,15 @@ class _BoxAdditionState extends State<BoxAddition> {
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Add box'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: primaryColor),
|
||||
child: Text(
|
||||
'Add box',
|
||||
style: TextStyle(color: Colors.white),
|
||||
),
|
||||
// color: primaryColor,
|
||||
// textColor: Colors.white,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
@@ -90,10 +95,13 @@ class _BoxAdditionState extends State<BoxAddition> {
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 250,
|
||||
child: FlatButton(
|
||||
child: Text('Save box'),
|
||||
color: primaryColor,
|
||||
textColor: Colors.white,
|
||||
child: TextButton(
|
||||
style: TextButton.styleFrom(
|
||||
backgroundColor: primaryColor),
|
||||
child: Text('Save box',
|
||||
style: TextStyle(color: Colors.white)),
|
||||
// color: primaryColor,
|
||||
// textColor: Colors.white,
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
||||
@@ -76,7 +76,7 @@ class InvoiceListRow extends StatelessWidget {
|
||||
? Padding(
|
||||
padding: const EdgeInsets.only(left: 10.0),
|
||||
child: InkWell(
|
||||
child: RaisedButton(
|
||||
child: ElevatedButton(
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Icon(
|
||||
|
||||
@@ -148,12 +148,12 @@ class _HomePageState extends State<HomePage> {
|
||||
}
|
||||
|
||||
_initLocalNotifications() {
|
||||
var initializationSettingsAndroid =
|
||||
new AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||
var initializationSettingsIOS = new IOSInitializationSettings();
|
||||
var initializationSettings = new InitializationSettings(
|
||||
android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
|
||||
_flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||
// var initializationSettingsAndroid =
|
||||
// new AndroidInitializationSettings('@mipmap/ic_launcher');
|
||||
// var initializationSettingsIOS = new IOSInitializationSettings();
|
||||
// var initializationSettings = new InitializationSettings(
|
||||
// android: initializationSettingsAndroid, iOS: initializationSettingsIOS);
|
||||
// _flutterLocalNotificationsPlugin.initialize(initializationSettings);
|
||||
}
|
||||
|
||||
static Future _showNotification(Map<String, dynamic> message) async {
|
||||
@@ -176,29 +176,29 @@ class _HomePageState extends State<HomePage> {
|
||||
print("AppPushs params pushAction : $action");
|
||||
|
||||
// @formatter:off
|
||||
var platformChannelSpecificsAndroid = new AndroidNotificationDetails(
|
||||
'your channel id', 'your channel name', 'your channel description',
|
||||
playSound: true,
|
||||
enableVibration: true,
|
||||
importance: Importance.max,
|
||||
priority: Priority.high);
|
||||
// var platformChannelSpecificsAndroid = new AndroidNotificationDetails(
|
||||
// 'your channel id', 'your channel name', 'your channel description',
|
||||
// playSound: true,
|
||||
// enableVibration: true,
|
||||
// importance: Importance.max,
|
||||
// priority: Priority.high);
|
||||
|
||||
// @formatter:on
|
||||
var platformChannelSpecificsIos =
|
||||
new IOSNotificationDetails(presentSound: true);
|
||||
var platformChannelSpecifics = new NotificationDetails(
|
||||
android: platformChannelSpecificsAndroid,
|
||||
iOS: platformChannelSpecificsIos);
|
||||
// var platformChannelSpecificsIos =
|
||||
// new IOSNotificationDetails(presentSound: true);
|
||||
// var platformChannelSpecifics = new NotificationDetails(
|
||||
// android: platformChannelSpecificsAndroid,
|
||||
// iOS: platformChannelSpecificsIos);
|
||||
|
||||
new Future.delayed(Duration.zero, () {
|
||||
_flutterLocalNotificationsPlugin.show(
|
||||
0,
|
||||
pushTitle,
|
||||
pushText,
|
||||
platformChannelSpecifics,
|
||||
payload: 'No_Sound',
|
||||
);
|
||||
});
|
||||
// new Future.delayed(Duration.zero, () {
|
||||
// _flutterLocalNotificationsPlugin.show(
|
||||
// 0,
|
||||
// pushTitle,
|
||||
// pushText,
|
||||
// platformChannelSpecifics,
|
||||
// payload: 'No_Sound',
|
||||
// );
|
||||
// });
|
||||
}
|
||||
|
||||
void dispose() {
|
||||
@@ -387,7 +387,7 @@ class _HomePageState extends State<HomePage> {
|
||||
isSelected: languageModel.currentState,
|
||||
selectedBorderColor: Colors.white24,
|
||||
);
|
||||
final signinBtn = FlatButton(
|
||||
final signinBtn = TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context)
|
||||
.push(CupertinoPageRoute(builder: (context) => SigninPage()));
|
||||
|
||||
@@ -19,7 +19,7 @@ Future showMsgDialog(BuildContext context, String title, String msg) {
|
||||
title: new Text(title),
|
||||
content: new Text(msg),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
new TextButton(
|
||||
child: new Text("Close"),
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
@@ -51,8 +51,10 @@ Future<void> showConfirmDialog(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
FlatButton(
|
||||
color: Colors.grey[300],
|
||||
TextButton(
|
||||
style:
|
||||
TextButton.styleFrom(backgroundColor: Colors.grey[300]),
|
||||
// color: Colors.grey[300],
|
||||
child: Text(
|
||||
AppTranslations.of(context)!.text('btn.cancel'),
|
||||
style: Provider.of<LanguageModel>(context).isEng
|
||||
@@ -65,8 +67,9 @@ Future<void> showConfirmDialog(
|
||||
SizedBox(
|
||||
width: 0,
|
||||
),
|
||||
FlatButton(
|
||||
color: primaryColor,
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||
// color: primaryColor,
|
||||
child: Text(AppTranslations.of(context)!.text('btn.ok'),
|
||||
style: Provider.of<LanguageModel>(context).isEng
|
||||
? TextStyle(
|
||||
@@ -343,7 +346,7 @@ Widget fcsButton(BuildContext context, String text,
|
||||
child: ButtonTheme(
|
||||
minWidth: 900.0,
|
||||
height: 100.0,
|
||||
child: FlatButton(
|
||||
child: TextButton(
|
||||
onPressed: callack == null ? null : () => callack(),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -371,7 +374,7 @@ String getLocalString(BuildContext context, String key) {
|
||||
}
|
||||
|
||||
void showToast(GlobalKey key, String text) {
|
||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
||||
final ScaffoldMessengerState scaffold = key.currentState as ScaffoldMessengerState;
|
||||
scaffold.showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(text),
|
||||
|
||||
@@ -83,7 +83,7 @@ class _WelcomePageState extends State<WelcomePage> {
|
||||
onPressed: _langChange,
|
||||
isSelected: isSelected,
|
||||
),
|
||||
FlatButton(
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(CupertinoPageRoute(
|
||||
builder: (context) => SigninPage()));
|
||||
|
||||
@@ -166,12 +166,12 @@ class _MarketEditorState extends State<MarketEditor> {
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
new TextButton(
|
||||
child: LocalText(context, "btn.cancel", color: primaryColor),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
new FlatButton(
|
||||
new TextButton(
|
||||
child: LocalText(
|
||||
context,
|
||||
"btn.save",
|
||||
|
||||
@@ -21,7 +21,7 @@ class PaymentMethodPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _PaymentMethodPageState extends State<PaymentMethodPage> {
|
||||
GlobalKey key = GlobalKey();
|
||||
GlobalKey<ScaffoldMessengerState> key = GlobalKey<ScaffoldMessengerState>();
|
||||
bool _isLoading = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -153,7 +153,8 @@ class _PaymentMethodPageState extends State<PaymentMethodPage> {
|
||||
}
|
||||
|
||||
void _showToast(String title) {
|
||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
||||
final ScaffoldMessengerState scaffold =
|
||||
key.currentState as ScaffoldMessengerState;
|
||||
scaffold.showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('copied "$title" data to clipboard'),
|
||||
|
||||
@@ -31,7 +31,7 @@ class Profile extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _ProfileState extends State<Profile> {
|
||||
GlobalKey key = GlobalKey();
|
||||
GlobalKey<ScaffoldMessengerState> key = GlobalKey<ScaffoldMessengerState>();
|
||||
bool _isLoading = false;
|
||||
String? selectedLanguage;
|
||||
TextEditingController bizNameController = new TextEditingController();
|
||||
@@ -275,7 +275,8 @@ class _ProfileState extends State<Profile> {
|
||||
}
|
||||
|
||||
_showToast(String title) {
|
||||
final ScaffoldState scaffold = key.currentState as ScaffoldState;
|
||||
final ScaffoldMessengerState scaffold =
|
||||
key.currentState as ScaffoldMessengerState;
|
||||
scaffold.showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('copied "$title" data to clipboard'),
|
||||
@@ -302,7 +303,8 @@ class _ProfileState extends State<Profile> {
|
||||
});
|
||||
try {
|
||||
await context.read<MainModel>().signout();
|
||||
} catch (e) {} finally {
|
||||
} catch (e) {
|
||||
} finally {
|
||||
Future.delayed(Duration(seconds: 1), () {
|
||||
if (mounted) {
|
||||
setState(() {
|
||||
|
||||
@@ -53,9 +53,9 @@ class _ShipmentRatesCalState extends State<ShipmentRatesCal> {
|
||||
_calShipmentWeight() {
|
||||
Rate rate = Provider.of<ShipmentRateModel>(context, listen: false).rate;
|
||||
|
||||
double l = double.parse(_lengthController.text, (s) => 0);
|
||||
double w = double.parse(_widthController.text, (s) => 0);
|
||||
double h = double.parse(_heightController.text, (s) => 0);
|
||||
double l = double.parse(_lengthController.text);
|
||||
double w = double.parse(_widthController.text);
|
||||
double h = double.parse(_heightController.text);
|
||||
_cargoType.weight = double.tryParse(_actualWeightCtl.text) ?? 0;
|
||||
Carton box =
|
||||
Carton(cargoTypes: [_cargoType], length: l, width: w, height: h);
|
||||
|
||||
@@ -72,9 +72,9 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
|
||||
}
|
||||
|
||||
_calShipmentWeight() {
|
||||
double l = double.parse(_lengthCtl.text, (s) => 0);
|
||||
double w = double.parse(_widthCtl.text, (s) => 0);
|
||||
double h = double.parse(_heightCtl.text, (s) => 0);
|
||||
double l = double.parse(_lengthCtl.text);
|
||||
double w = double.parse(_widthCtl.text);
|
||||
double h = double.parse(_heightCtl.text);
|
||||
setState(() {
|
||||
shipmentWeight = (l * w * h / volumetricRatio).ceilToDouble();
|
||||
});
|
||||
@@ -296,9 +296,9 @@ class _ShipmentBoxEditorState extends State<ShipmentBoxEditor> {
|
||||
}
|
||||
|
||||
_creatCarton() {
|
||||
double l = double.parse(_lengthCtl.text, (s) => 0);
|
||||
double w = double.parse(_widthCtl.text, (s) => 0);
|
||||
double h = double.parse(_heightCtl.text, (s) => 0);
|
||||
double l = double.parse(_lengthCtl.text);
|
||||
double w = double.parse(_widthCtl.text);
|
||||
double h = double.parse(_heightCtl.text);
|
||||
_box!.length = l;
|
||||
_box!.width = w;
|
||||
_box!.height = h;
|
||||
|
||||
@@ -90,7 +90,7 @@ class _RequestInvitationPageState extends State<RequestInvitationPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
RaisedButton(
|
||||
ElevatedButton(
|
||||
onPressed: _request,
|
||||
child: Text(getLocalString(context, "invite.request")),
|
||||
)
|
||||
|
||||
@@ -128,19 +128,29 @@ class _SmsCodePageState extends State<SmsCodePage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
RaisedButton(
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
canResend ? Colors.white : Colors.grey,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(10.0),
|
||||
side: BorderSide(
|
||||
color: canResend
|
||||
? primaryColor
|
||||
: Colors.grey.shade400))),
|
||||
onPressed: canResend ? _resend : null,
|
||||
color: canResend ? Colors.white : Colors.grey,
|
||||
// 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)),
|
||||
color: canResend
|
||||
? primaryColor
|
||||
: Colors.grey.shade400),
|
||||
// shape: RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.circular(10.0),
|
||||
// side: BorderSide(
|
||||
// color: canResend
|
||||
// ? primaryColor
|
||||
// : Colors.grey.shade400)),
|
||||
),
|
||||
InkWell(
|
||||
onTap: allNumberEntered ? _verify : null,
|
||||
|
||||
@@ -58,7 +58,7 @@ class _DialogInputState extends State<DialogInput> {
|
||||
),
|
||||
),
|
||||
actions: <Widget>[
|
||||
FlatButton(
|
||||
TextButton(
|
||||
child: LocalText(
|
||||
context,
|
||||
'btn.cancel',
|
||||
@@ -68,8 +68,9 @@ class _DialogInputState extends State<DialogInput> {
|
||||
_controller.clear();
|
||||
Navigator.of(context).pop();
|
||||
}),
|
||||
FlatButton(
|
||||
color: primaryColor,
|
||||
TextButton(
|
||||
style: TextButton.styleFrom(backgroundColor: primaryColor),
|
||||
// color: primaryColor,
|
||||
child: LocalText(
|
||||
context,
|
||||
'btn.ok',
|
||||
|
||||
@@ -32,7 +32,9 @@ class _FcsExpansionTileState extends State<FcsExpansionTile> {
|
||||
Widget build(BuildContext context) {
|
||||
return Theme(
|
||||
data: ThemeData(
|
||||
accentColor: primaryColor, dividerColor: Colors.transparent),
|
||||
dividerColor: Colors.transparent,
|
||||
colorScheme:
|
||||
ColorScheme.fromSwatch().copyWith(secondary: primaryColor)),
|
||||
child: ExpansionTile(
|
||||
onExpansionChanged: (value) {
|
||||
setState(() {
|
||||
|
||||
@@ -42,7 +42,7 @@ class _LengthPickerState extends State<LengthPicker> {
|
||||
}
|
||||
|
||||
_setText() {
|
||||
double v = double.parse(widget.controller!.text, (s) => 0);
|
||||
double v = double.parse(widget.controller!.text);
|
||||
int _v = v.toInt();
|
||||
|
||||
int f = (v / 12).floor();
|
||||
@@ -107,7 +107,7 @@ class _LengthPickerDialogState extends State<LengthPickerDialog> {
|
||||
_valueFeet = 0;
|
||||
_valueInc = 0;
|
||||
if (widget.controller != null) {
|
||||
double v = double.parse(widget.controller!.text, (s) => 0);
|
||||
double v = double.parse(widget.controller!.text);
|
||||
_valueFeet = (v / 12).floor();
|
||||
_valueInc = widget.displayFeet! ? (v % 12).toInt() : v.toInt();
|
||||
inchInputController.text = _valueInc.toString();
|
||||
|
||||
@@ -32,7 +32,7 @@ class LocalButton extends StatelessWidget {
|
||||
child: ButtonTheme(
|
||||
minWidth: 900.0,
|
||||
height: 100.0,
|
||||
child: FlatButton(
|
||||
child: TextButton(
|
||||
onPressed: callBack == null ? null : () => callBack!(),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -176,7 +176,7 @@ class _MultiImageFileState extends State<MultiImageFile> {
|
||||
}
|
||||
|
||||
_openImagePicker(bool camera) async {
|
||||
var selectedFile = await ImagePicker().getImage(
|
||||
var selectedFile = await ImagePicker().pickImage(
|
||||
source: camera ? ImageSource.camera : ImageSource.gallery,
|
||||
imageQuality: 80,
|
||||
maxWidth: 1000);
|
||||
@@ -213,7 +213,7 @@ class _MultiImageFileState extends State<MultiImageFile> {
|
||||
await _dialog(
|
||||
context, () => camera = true, () => gallery = true);
|
||||
if (camera || gallery) {
|
||||
var selectedFile = await ImagePicker().getImage(
|
||||
var selectedFile = await ImagePicker().pickImage(
|
||||
source: camera ? ImageSource.camera : ImageSource.gallery,
|
||||
imageQuality: 80,
|
||||
maxWidth: 1000);
|
||||
|
||||
@@ -773,20 +773,20 @@ class TableRowInkWell extends InkResponse {
|
||||
RectCallback getRectCallback(RenderBox referenceBox) {
|
||||
return () {
|
||||
RenderObject cell = referenceBox;
|
||||
AbstractNode? table = cell.parent;
|
||||
RenderObject? table = cell.parent;
|
||||
final Matrix4 transform = Matrix4.identity();
|
||||
while (table is RenderObject && table is! RenderTable) {
|
||||
final RenderObject parentBox = table as RenderObject;
|
||||
final RenderObject parentBox = table;
|
||||
parentBox.applyPaintTransform(cell, transform);
|
||||
assert(table == cell.parent);
|
||||
cell = parentBox;
|
||||
table = table.parent;
|
||||
table = table?.parent;
|
||||
}
|
||||
if (table is RenderTable) {
|
||||
final TableCellParentData cellParentData =
|
||||
cell.parentData as TableCellParentData;
|
||||
assert(cellParentData.y != null);
|
||||
final Rect rect = table.getRowBox(cellParentData.y!);
|
||||
final Rect rect = table .getRowBox(cellParentData.y!);
|
||||
// The rect is in the table's coordinate space. We need to change it to the
|
||||
// TableRowInkWell's coordinate space.
|
||||
table.applyPaintTransform(cell, transform);
|
||||
|
||||
Reference in New Issue
Block a user