From 4b6b4dafc727d3096ccced9cd6d850553e58119b Mon Sep 17 00:00:00 2001 From: bossanyit Date: Sun, 16 May 2021 23:48:57 +0200 Subject: [PATCH] WT1.1.17 +4 pointer fix --- i18n/en.json | 4 +- i18n/hu.json | 4 +- ios/Runner.xcodeproj/project.pbxproj | 12 +-- lib/bloc/exercise_new/exercise_new_bloc.dart | 36 +------- lib/main.dart | 3 +- lib/model/cache.dart | 1 + lib/repository/remote_config_repository.dart | 24 ++++++ lib/service/firebase_api.dart | 1 + lib/util/common.dart | 4 +- lib/view/customer_modify_page.dart | 76 ++++++++++++++--- lib/view/exercise_new_page.dart | 2 +- .../exercise_plan_custom_detail_add_page.dart | 1 + lib/view/mydevelopment_page.dart | 2 + lib/widgets/bmi_widget.dart | 82 ++++++++++++------- lib/widgets/bmr_widget.dart | 19 +++-- lib/widgets/exercise_save.dart | 1 + lib/widgets/input_dialog_widget.dart | 6 +- pubspec.yaml | 2 +- 18 files changed, 187 insertions(+), 93 deletions(-) create mode 100644 lib/repository/remote_config_repository.dart diff --git a/i18n/en.json b/i18n/en.json index 764a2e3..7b830c0 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -475,6 +475,8 @@ "Activate":"Activate", "Try free for 3 days!":"Try it without risk for 3 days! In this period you can cancel any time without lasting your account.", - "View other alternatives":"View other alternatives" + "View other alternatives":"View other alternatives", + + "Please log in, because we can calculate the best suggestions for you":"Please log in, because we can calculate the best suggestions for you" } \ No newline at end of file diff --git a/i18n/hu.json b/i18n/hu.json index bcb8476..f627cf1 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -467,5 +467,7 @@ "Activate":"Aktiválás", "Try free for 3 days!":"Próbáld ki kockázat nélkül 3 napig! Ebben az időszakban bármikor lemondhatod, anélkül, hogy megterhelnénk a számládat.", - "View other alternatives":"Megnézek egy másik lehetőséget" + "View other alternatives":"Megnézek egy másik lehetőséget", + + "Please log in, because we can calculate the best suggestions for you":"Kérlek jelentkezz be, mert csak így tudjuk neked a legjobb gyakorlatokat kalkulálni" } \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 340629d..459e2f4 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -405,7 +405,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.1.16; + MARKETING_VERSION = 1.1.17; PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -531,7 +531,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -548,7 +548,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.1.16; + MARKETING_VERSION = 1.1.17; PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -566,7 +566,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 3; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -583,7 +583,7 @@ "$(inherited)", "$(PROJECT_DIR)/Flutter", ); - MARKETING_VERSION = 1.1.16; + MARKETING_VERSION = 1.1.17; PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/bloc/exercise_new/exercise_new_bloc.dart b/lib/bloc/exercise_new/exercise_new_bloc.dart index e1e78ad..7db6f21 100644 --- a/lib/bloc/exercise_new/exercise_new_bloc.dart +++ b/lib/bloc/exercise_new/exercise_new_bloc.dart @@ -211,53 +211,21 @@ class ExerciseNewBloc extends Bloc with Logg if (this.bmi == 0) { getBMI(); } - final double distortionWidth = customerRepository.mediaWidth / baseWidth; - final double distortionHeight = distortionWidth - 0.02; //mediaHeight / baseHeight; - /* log("Width: " + - mediaWidth.toStringAsFixed(0) + - " Height: " + - mediaHeight.toStringAsFixed(0) + - " BaseW: " + - baseWidth.toStringAsFixed(0) + - " BaseH: " + - baseHeight.toStringAsFixed(0) + - " DistW: " + - distortionWidth.toStringAsFixed(2) + - " DistH: " + - distortionHeight.toStringAsFixed(2)); */ - - this.bmiAngle = (bmi * 90 / 25) - 90; if (bmi < 18.5) { goalMilestoneBMI = 19; - goalBMI = 21.75; - this.bmiTop = 99 * distortionHeight; - this.bmiLeft = 77 * distortionWidth; - bmiAngle = -62; } else if (bmi > 18.5 && bmi < 25) { - goalBMI = 21.75; goalMilestoneBMI = 21.75; - this.bmiTop = 48 * distortionHeight; - this.bmiLeft = 130 * distortionWidth; - bmiAngle = -23; } else if (bmi < 30 && bmi > 24.9) { goalMilestoneBMI = 24; - goalBMI = 21.75; - this.bmiTop = 40.0 * distortionHeight; - this.bmiLeft = 184.0 * distortionWidth; + bmiAngle = 7.2; } else if (bmi < 34.9 && 29.9 < bmi) { goalMilestoneBMI = 29; - goalBMI = 24; - bmiTop = 48 * distortionHeight; - bmiLeft = 211 * distortionWidth; } else if (bmi > 35) { goalMilestoneBMI = 34; - goalBMI = 24; - bmiTop = 94 * distortionHeight; - bmiLeft = 260 * distortionWidth; - bmiAngle = 59; } + goalBMI = 24; this.goalWeight = goalBMI * (height * height / 10000); this.goalMilestoneWeight = goalMilestoneBMI * (height * height / 10000); diff --git a/lib/main.dart b/lib/main.dart index 652a4af..e4e6dd1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -189,9 +189,8 @@ Future main() async { Future initThirdParty() async { if (!isInDebugMode) { await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true); - - PushNotificationsManager().init(); FlutterUxcam.optIntoSchematicRecordings(); + PushNotificationsManager().init(); } } diff --git a/lib/model/cache.dart b/lib/model/cache.dart index 49d2a45..aaeb40f 100644 --- a/lib/model/cache.dart +++ b/lib/model/cache.dart @@ -635,6 +635,7 @@ class Cache with Logging { Flurry.setUserId(customerId.toString()); //Smartlook.setUserIdentifier(customerId.toString()); FlutterUxcam.setUserProperty("username", customerId.toString()); + FlutterUxcam.setUserIdentity(customerId.toString()); Track().track(TrackingEvent.enter); } diff --git a/lib/repository/remote_config_repository.dart b/lib/repository/remote_config_repository.dart new file mode 100644 index 0000000..a5b1121 --- /dev/null +++ b/lib/repository/remote_config_repository.dart @@ -0,0 +1,24 @@ +import 'package:aitrainer_app/model/cache.dart'; +import 'package:aitrainer_app/service/logging.dart'; +import 'package:firebase_remote_config/firebase_remote_config.dart'; + +class RemoteConfigRepository with Logging { + RemoteConfig? remoteConfig; + + String getConfigValue(String configKey, String baseValue) { + String value = ""; + remoteConfig = Cache().remoteConfig; + if (remoteConfig != null) { + remoteConfig!.fetchAndActivate(); + Map config = remoteConfig!.getAll(); + RemoteConfigValue? configValue = config[configKey]; + if (configValue != null && configValue.asString().isNotEmpty) { + log("RemoteConfig $configKey value: ${configValue.asString()}"); + if (configValue.asString() == baseValue) { + value = configValue.asString(); + } + } + } + return value; + } +} diff --git a/lib/service/firebase_api.dart b/lib/service/firebase_api.dart index 36a776c..3c15bd9 100644 --- a/lib/service/firebase_api.dart +++ b/lib/service/firebase_api.dart @@ -300,6 +300,7 @@ class FirebaseApi with logging.Logging { 'sales_page_text': '0', 'sales_page_bkg': 'dark', 'sales_page_offer': 'monthly', + 'please_log_in': '', }); RemoteConfigValue(null, ValueSource.valueStatic); Cache().setRemoteConfig(remoteConfig); diff --git a/lib/util/common.dart b/lib/util/common.dart index e3f7d60..83f1457 100644 --- a/lib/util/common.dart +++ b/lib/util/common.dart @@ -140,6 +140,8 @@ mixin Common { } static normalizeDecimal(String value) { - return value.replaceFirst(",", "."); + value = value.replaceFirst(",", "."); + value = value.replaceAll(RegExp(r'[^0-9.]'), ""); + return value; } } diff --git a/lib/view/customer_modify_page.dart b/lib/view/customer_modify_page.dart index 7d472da..58200ac 100644 --- a/lib/view/customer_modify_page.dart +++ b/lib/view/customer_modify_page.dart @@ -221,11 +221,13 @@ class CustomerModifyPage extends StatelessWidget with Trans { SfLinearGauge( minimum: 1950, maximum: 2020, + labelPosition: LinearLabelPosition.outside, + tickPosition: LinearElementPosition.outside, markerPointers: [ LinearWidgetPointer( value: customerBloc.year!.toDouble(), offset: 5, - position: LinearElementPosition.inside, + position: LinearElementPosition.outside, markerAlignment: LinearMarkerAlignment.center, child: Container( height: 14, @@ -241,8 +243,11 @@ class CustomerModifyPage extends StatelessWidget with Trans { ), LinearShapePointer( value: customerBloc.year!.toDouble(), - height: 35, - width: 15, + position: LinearElementPosition.inside, + shapeType: LinearShapePointerType.triangle, + color: Colors.blue, + height: 55, + width: 25, onValueChanged: (value) => { customerBloc.add(CustomerBirthYearChange(year: value.toInt())), }, @@ -273,7 +278,53 @@ class CustomerModifyPage extends StatelessWidget with Trans { fontWeight: FontWeight.normal, fontSize: 18, )), - SfRadialGauge( + Divider( + color: Colors.transparent, + ), + SfLinearGauge( + minimum: 40, + maximum: 150, + labelPosition: LinearLabelPosition.outside, + tickPosition: LinearElementPosition.outside, + markerPointers: [ + LinearWidgetPointer( + value: customerBloc.weight, + offset: 5, + position: LinearElementPosition.outside, + markerAlignment: LinearMarkerAlignment.center, + child: Container( + height: 14, + width: 44, + color: Colors.transparent, + child: Text(customerBloc.weight.toStringAsFixed(1), + style: GoogleFonts.inter( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.indigo, + )), + ), + ), + LinearShapePointer( + position: LinearElementPosition.inside, + shapeType: LinearShapePointerType.triangle, + value: customerBloc.weight, + height: 55, + width: 25, + color: Colors.blue, + onValueChanged: (value) => { + customerBloc.add(CustomerWeightChange(weight: value)), + }, + ), + ], + orientation: LinearGaugeOrientation.horizontal, + majorTickStyle: LinearTickStyle(length: 20), + axisLabelStyle: TextStyle(fontSize: 12.0, color: Colors.black), + axisTrackStyle: LinearAxisTrackStyle( + color: Colors.cyan, edgeStyle: LinearEdgeStyle.bothFlat, thickness: 1.0, borderColor: Colors.grey)), + Divider( + color: Colors.transparent, + ), + /* SfRadialGauge( axes: [ RadialAxis( axisLineStyle: AxisLineStyle( @@ -301,15 +352,15 @@ class CustomerModifyPage extends StatelessWidget with Trans { knobStyle: KnobStyle(color: Colors.blue[800]), value: customerBloc.weight.toDouble(), enableAnimation: true, - enableDragging: true, - needleStartWidth: 6, + //enableDragging: true, + needleStartWidth: 1, needleEndWidth: 12, - onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))}, + //onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))}, ) ], ) ], - ), + ), */ ]), ), Divider( @@ -353,8 +404,8 @@ class CustomerModifyPage extends StatelessWidget with Trans { position: LinearElementPosition.inside, markerAlignment: LinearMarkerAlignment.center, child: Container( - height: 14, - width: 44, + height: 25, + width: 55, color: Colors.transparent, child: Text(customerBloc.height.toString(), style: GoogleFonts.inter( @@ -365,8 +416,9 @@ class CustomerModifyPage extends StatelessWidget with Trans { ), ), LinearShapePointer( - height: 15, - width: 35, + height: 25, + width: 55, + color: Colors.blue, value: customerBloc.height, onValueChanged: (value) => { customerBloc.add(CustomerHeightChange(height: value.toInt())), diff --git a/lib/view/exercise_new_page.dart b/lib/view/exercise_new_page.dart index 7d67820..12b0c91 100644 --- a/lib/view/exercise_new_page.dart +++ b/lib/view/exercise_new_page.dart @@ -251,7 +251,7 @@ class _ExerciseNewPageState extends State with Trans, Logging { onPressed: () { if (Cache().userLoggedIn == null) { Navigator.pop(context); - bloc.add(ExerciseNewAddError(message: "Please log in")); + bloc.add(ExerciseNewAddError(message: "Please log in, because we can calculate the best suggestions for you")); } else { saveAll(bloc); if (executeBloc.existsActivePlan() == true) { diff --git a/lib/view/exercise_plan_custom_detail_add_page.dart b/lib/view/exercise_plan_custom_detail_add_page.dart index 0a67620..1f6f921 100644 --- a/lib/view/exercise_plan_custom_detail_add_page.dart +++ b/lib/view/exercise_plan_custom_detail_add_page.dart @@ -244,6 +244,7 @@ class _ExercisePlanDetailAddPage extends State with T if (value.isNotEmpty) { value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), bloc.add(ExercisePlanCustomAddChangeQuantityUnit(quantity: double.parse(value))) } }) diff --git a/lib/view/mydevelopment_page.dart b/lib/view/mydevelopment_page.dart index e69e9b1..6ea4589 100644 --- a/lib/view/mydevelopment_page.dart +++ b/lib/view/mydevelopment_page.dart @@ -92,6 +92,8 @@ class _MyDevelopmentPage extends State with Trans { args['customerId'] = Cache().userLoggedIn!.customerId, Navigator.of(context).pushNamed('mydevelopmentBodyPage', arguments: args) } + else + {} }, isLocked: true, ), diff --git a/lib/widgets/bmi_widget.dart b/lib/widgets/bmi_widget.dart index 0c1c1be..d22c32d 100644 --- a/lib/widgets/bmi_widget.dart +++ b/lib/widgets/bmi_widget.dart @@ -209,29 +209,6 @@ class _BMIState extends State with Trans { ) ], ), - - /* Stack(alignment: Alignment.center, children: [ - Container( - padding: EdgeInsets.only(left: 30, right: 30), - child: Image.asset( - "asset/image/BMI_graph_C.png", - ), - ), - Positioned( - top: widget.exerciseBloc.bmiTop, - left: widget.exerciseBloc.bmiLeft, - child: - Container() RotationAnimatedWidget.tween( - enabled: true, - duration: const Duration(milliseconds: 1000), - rotationDisabled: Rotation.deg(), - rotationEnabled: Rotation.deg(z: widget.exerciseBloc.bmiAngle), - child: Image.asset( - "asset/image/BMI_mutato.png", - width: 65, - )) - ) - ]), */ Divider(color: Colors.transparent), Container( padding: EdgeInsets.only(left: 65, right: 65), @@ -335,8 +312,11 @@ class _BMIState extends State with Trans { keyboardType: TextInputType.numberWithOptions(decimal: false), textInputAction: TextInputAction.done, style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), - onChanged: (value) => - {value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}), + onChanged: (value) => { + value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), + widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value))), + }), ); } else { return Container(); @@ -355,7 +335,50 @@ class _BMIState extends State with Trans { width: 10, ), Flexible( - child: TextFormField( + child: + /* SfLinearGauge( + minimum: widget.exerciseBloc.weight > 0 ? (widget.exerciseBloc.weight - 10).floor().toDouble() : 40, + maximum: widget.exerciseBloc.weight > 0 ? (widget.exerciseBloc.weight + 10).ceil().toDouble() : 150, + labelPosition: LinearLabelPosition.outside, + tickPosition: LinearElementPosition.outside, + markerPointers: [ + LinearWidgetPointer( + value: widget.exerciseBloc.weight, + offset: 5, + position: LinearElementPosition.outside, + markerAlignment: LinearMarkerAlignment.center, + child: Container( + height: 14, + width: 44, + color: Colors.transparent, + child: Text(widget.exerciseBloc.weight.toStringAsFixed(1), + style: GoogleFonts.inter( + fontSize: 12, + fontWeight: FontWeight.bold, + color: Colors.white, + )), + ), + ), + LinearShapePointer( + position: LinearElementPosition.inside, + shapeType: LinearShapePointerType.triangle, + value: widget.exerciseBloc.weight, + height: 45, + width: 20, + color: Colors.yellow[200], + onValueChanged: (value) => {widget.exerciseBloc.add(ExerciseNewWeightChange(value: value))}, + ), + ], + orientation: LinearGaugeOrientation.horizontal, + majorTickStyle: LinearTickStyle(length: 20, color: Colors.yellow[50]), + axisLabelStyle: TextStyle(fontSize: 12.0, color: Colors.yellow[50]), + axisTrackStyle: LinearAxisTrackStyle( + color: Colors.cyan, + edgeStyle: LinearEdgeStyle.bothFlat, + thickness: 1.0, + borderColor: Colors + .grey)), */ + TextFormField( focusNode: _nodeText1, decoration: InputDecoration( contentPadding: EdgeInsets.only(left: 15, top: 5, bottom: 5), @@ -373,8 +396,11 @@ class _BMIState extends State with Trans { keyboardType: TextInputType.numberWithOptions(decimal: true), textInputAction: TextInputAction.done, style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), - onChanged: (value) => - {value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))}, + onChanged: (value) => { + value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), + widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value))), + }, ), ), IconButton( diff --git a/lib/widgets/bmr_widget.dart b/lib/widgets/bmr_widget.dart index bc7382a..9ca0a33 100644 --- a/lib/widgets/bmr_widget.dart +++ b/lib/widgets/bmr_widget.dart @@ -216,8 +216,11 @@ class _BMRState extends State with Trans { keyboardType: TextInputType.numberWithOptions(decimal: false), textInputAction: TextInputAction.done, style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), - onChanged: (value) => - {value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}), + onChanged: (value) => { + value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), + widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value))), + }), ); } else { return Container(); @@ -244,7 +247,10 @@ class _BMRState extends State with Trans { keyboardType: TextInputType.numberWithOptions(decimal: false), textInputAction: TextInputAction.done, style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), - onChanged: (value) => {widget.exerciseBloc.add(ExerciseNewBirthyearChange(value: int.parse(value)))}), + onChanged: (value) => { + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), + widget.exerciseBloc.add(ExerciseNewBirthyearChange(value: int.parse(value))) + }), ); } @@ -366,8 +372,11 @@ class _BMRState extends State with Trans { keyboardType: TextInputType.numberWithOptions(decimal: true), textInputAction: TextInputAction.done, style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), - onChanged: (value) => - {value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))}, + onChanged: (value) => { + value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), + widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value))), + }, ), ), IconButton( diff --git a/lib/widgets/exercise_save.dart b/lib/widgets/exercise_save.dart index 199d389..bf1b4c1 100644 --- a/lib/widgets/exercise_save.dart +++ b/lib/widgets/exercise_save.dart @@ -257,6 +257,7 @@ class _ExerciseSaveState extends State with Trans { style: GoogleFonts.archivoBlack(fontSize: 80, color: Colors.yellow[300]), onChanged: (value) => { value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), widget.onUnitQuantityChanged!(value), }), ])); diff --git a/lib/widgets/input_dialog_widget.dart b/lib/widgets/input_dialog_widget.dart index a1126d8..e6964c7 100644 --- a/lib/widgets/input_dialog_widget.dart +++ b/lib/widgets/input_dialog_widget.dart @@ -156,7 +156,11 @@ class _InputDialogState extends State> with Trans { keyboardType: TextInputType.numberWithOptions(decimal: true), textInputAction: TextInputAction.done, style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), - onChanged: (value) => {value = value.replaceFirst(",", "."), this.inputValue = double.parse(value)}, + onChanged: (value) => { + value = value.replaceFirst(",", "."), + value = value.replaceAll(RegExp(r'[^0-9.]'), ""), + this.inputValue = double.parse(value), + }, ), ), SizedBox( diff --git a/pubspec.yaml b/pubspec.yaml index 665b8b6..f76e5ce 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.1.17+80 +version: 1.1.17+81 environment: sdk: ">=2.12.0 <3.0.0"