WT1.1.17 +4 pointer fix

This commit is contained in:
bossanyit 2021-05-16 23:48:57 +02:00
parent 7b0d15aede
commit 4b6b4dafc7
18 changed files with 187 additions and 93 deletions

View File

@ -475,6 +475,8 @@
"Activate":"Activate", "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.", "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"
} }

View File

@ -467,5 +467,7 @@
"Activate":"Aktiválás", "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.", "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"
} }

View File

@ -388,7 +388,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -405,7 +405,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.1.16; MARKETING_VERSION = 1.1.17;
PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app; PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -531,7 +531,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -548,7 +548,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.1.16; MARKETING_VERSION = 1.1.17;
PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app; PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
@ -566,7 +566,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = SFJJBDCU6Z; DEVELOPMENT_TEAM = SFJJBDCU6Z;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -583,7 +583,7 @@
"$(inherited)", "$(inherited)",
"$(PROJECT_DIR)/Flutter", "$(PROJECT_DIR)/Flutter",
); );
MARKETING_VERSION = 1.1.16; MARKETING_VERSION = 1.1.17;
PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app; PRODUCT_BUNDLE_IDENTIFIER = com.aitrainer.app;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";

View File

@ -211,53 +211,21 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> with Logg
if (this.bmi == 0) { if (this.bmi == 0) {
getBMI(); 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) { if (bmi < 18.5) {
goalMilestoneBMI = 19; goalMilestoneBMI = 19;
goalBMI = 21.75;
this.bmiTop = 99 * distortionHeight;
this.bmiLeft = 77 * distortionWidth;
bmiAngle = -62;
} else if (bmi > 18.5 && bmi < 25) { } else if (bmi > 18.5 && bmi < 25) {
goalBMI = 21.75;
goalMilestoneBMI = 21.75; goalMilestoneBMI = 21.75;
this.bmiTop = 48 * distortionHeight;
this.bmiLeft = 130 * distortionWidth;
bmiAngle = -23;
} else if (bmi < 30 && bmi > 24.9) { } else if (bmi < 30 && bmi > 24.9) {
goalMilestoneBMI = 24; goalMilestoneBMI = 24;
goalBMI = 21.75;
this.bmiTop = 40.0 * distortionHeight;
this.bmiLeft = 184.0 * distortionWidth;
bmiAngle = 7.2; bmiAngle = 7.2;
} else if (bmi < 34.9 && 29.9 < bmi) { } else if (bmi < 34.9 && 29.9 < bmi) {
goalMilestoneBMI = 29; goalMilestoneBMI = 29;
goalBMI = 24;
bmiTop = 48 * distortionHeight;
bmiLeft = 211 * distortionWidth;
} else if (bmi > 35) { } else if (bmi > 35) {
goalMilestoneBMI = 34; goalMilestoneBMI = 34;
goalBMI = 24;
bmiTop = 94 * distortionHeight;
bmiLeft = 260 * distortionWidth;
bmiAngle = 59;
} }
goalBMI = 24;
this.goalWeight = goalBMI * (height * height / 10000); this.goalWeight = goalBMI * (height * height / 10000);
this.goalMilestoneWeight = goalMilestoneBMI * (height * height / 10000); this.goalMilestoneWeight = goalMilestoneBMI * (height * height / 10000);

View File

@ -189,9 +189,8 @@ Future<Null> main() async {
Future<void> initThirdParty() async { Future<void> initThirdParty() async {
if (!isInDebugMode) { if (!isInDebugMode) {
await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true); await Flurry.initialize(androidKey: "JNYCTCWBT34FM3J8TV36", iosKey: "3QBG7BSMGPDH24S8TRQP", enableLog: true);
PushNotificationsManager().init();
FlutterUxcam.optIntoSchematicRecordings(); FlutterUxcam.optIntoSchematicRecordings();
PushNotificationsManager().init();
} }
} }

View File

@ -635,6 +635,7 @@ class Cache with Logging {
Flurry.setUserId(customerId.toString()); Flurry.setUserId(customerId.toString());
//Smartlook.setUserIdentifier(customerId.toString()); //Smartlook.setUserIdentifier(customerId.toString());
FlutterUxcam.setUserProperty("username", customerId.toString()); FlutterUxcam.setUserProperty("username", customerId.toString());
FlutterUxcam.setUserIdentity(customerId.toString());
Track().track(TrackingEvent.enter); Track().track(TrackingEvent.enter);
} }

View File

@ -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;
}
}

View File

@ -300,6 +300,7 @@ class FirebaseApi with logging.Logging {
'sales_page_text': '0', 'sales_page_text': '0',
'sales_page_bkg': 'dark', 'sales_page_bkg': 'dark',
'sales_page_offer': 'monthly', 'sales_page_offer': 'monthly',
'please_log_in': '',
}); });
RemoteConfigValue(null, ValueSource.valueStatic); RemoteConfigValue(null, ValueSource.valueStatic);
Cache().setRemoteConfig(remoteConfig); Cache().setRemoteConfig(remoteConfig);

View File

@ -140,6 +140,8 @@ mixin Common {
} }
static normalizeDecimal(String value) { static normalizeDecimal(String value) {
return value.replaceFirst(",", "."); value = value.replaceFirst(",", ".");
value = value.replaceAll(RegExp(r'[^0-9.]'), "");
return value;
} }
} }

View File

@ -221,11 +221,13 @@ class CustomerModifyPage extends StatelessWidget with Trans {
SfLinearGauge( SfLinearGauge(
minimum: 1950, minimum: 1950,
maximum: 2020, maximum: 2020,
labelPosition: LinearLabelPosition.outside,
tickPosition: LinearElementPosition.outside,
markerPointers: [ markerPointers: [
LinearWidgetPointer( LinearWidgetPointer(
value: customerBloc.year!.toDouble(), value: customerBloc.year!.toDouble(),
offset: 5, offset: 5,
position: LinearElementPosition.inside, position: LinearElementPosition.outside,
markerAlignment: LinearMarkerAlignment.center, markerAlignment: LinearMarkerAlignment.center,
child: Container( child: Container(
height: 14, height: 14,
@ -241,8 +243,11 @@ class CustomerModifyPage extends StatelessWidget with Trans {
), ),
LinearShapePointer( LinearShapePointer(
value: customerBloc.year!.toDouble(), value: customerBloc.year!.toDouble(),
height: 35, position: LinearElementPosition.inside,
width: 15, shapeType: LinearShapePointerType.triangle,
color: Colors.blue,
height: 55,
width: 25,
onValueChanged: (value) => { onValueChanged: (value) => {
customerBloc.add(CustomerBirthYearChange(year: value.toInt())), customerBloc.add(CustomerBirthYearChange(year: value.toInt())),
}, },
@ -273,7 +278,53 @@ class CustomerModifyPage extends StatelessWidget with Trans {
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
fontSize: 18, 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>[ axes: <RadialAxis>[
RadialAxis( RadialAxis(
axisLineStyle: AxisLineStyle( axisLineStyle: AxisLineStyle(
@ -301,15 +352,15 @@ class CustomerModifyPage extends StatelessWidget with Trans {
knobStyle: KnobStyle(color: Colors.blue[800]), knobStyle: KnobStyle(color: Colors.blue[800]),
value: customerBloc.weight.toDouble(), value: customerBloc.weight.toDouble(),
enableAnimation: true, enableAnimation: true,
enableDragging: true, //enableDragging: true,
needleStartWidth: 6, needleStartWidth: 1,
needleEndWidth: 12, needleEndWidth: 12,
onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))}, //onValueChanged: (value) => {customerBloc.add(CustomerWeightChange(weight: value))},
) )
], ],
) )
], ],
), ), */
]), ]),
), ),
Divider( Divider(
@ -353,8 +404,8 @@ class CustomerModifyPage extends StatelessWidget with Trans {
position: LinearElementPosition.inside, position: LinearElementPosition.inside,
markerAlignment: LinearMarkerAlignment.center, markerAlignment: LinearMarkerAlignment.center,
child: Container( child: Container(
height: 14, height: 25,
width: 44, width: 55,
color: Colors.transparent, color: Colors.transparent,
child: Text(customerBloc.height.toString(), child: Text(customerBloc.height.toString(),
style: GoogleFonts.inter( style: GoogleFonts.inter(
@ -365,8 +416,9 @@ class CustomerModifyPage extends StatelessWidget with Trans {
), ),
), ),
LinearShapePointer( LinearShapePointer(
height: 15, height: 25,
width: 35, width: 55,
color: Colors.blue,
value: customerBloc.height, value: customerBloc.height,
onValueChanged: (value) => { onValueChanged: (value) => {
customerBloc.add(CustomerHeightChange(height: value.toInt())), customerBloc.add(CustomerHeightChange(height: value.toInt())),

View File

@ -251,7 +251,7 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> with Trans, Logging {
onPressed: () { onPressed: () {
if (Cache().userLoggedIn == null) { if (Cache().userLoggedIn == null) {
Navigator.pop(context); 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 { } else {
saveAll(bloc); saveAll(bloc);
if (executeBloc.existsActivePlan() == true) { if (executeBloc.existsActivePlan() == true) {

View File

@ -244,6 +244,7 @@ class _ExercisePlanDetailAddPage extends State<ExercisePlanDetailAddPage> with T
if (value.isNotEmpty) if (value.isNotEmpty)
{ {
value = value.replaceFirst(",", "."), value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
bloc.add(ExercisePlanCustomAddChangeQuantityUnit(quantity: double.parse(value))) bloc.add(ExercisePlanCustomAddChangeQuantityUnit(quantity: double.parse(value)))
} }
}) })

View File

@ -92,6 +92,8 @@ class _MyDevelopmentPage extends State<MyDevelopmentPage> with Trans {
args['customerId'] = Cache().userLoggedIn!.customerId, args['customerId'] = Cache().userLoggedIn!.customerId,
Navigator.of(context).pushNamed('mydevelopmentBodyPage', arguments: args) Navigator.of(context).pushNamed('mydevelopmentBodyPage', arguments: args)
} }
else
{}
}, },
isLocked: true, isLocked: true,
), ),

View File

@ -209,29 +209,6 @@ class _BMIState extends State<BMI> 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), Divider(color: Colors.transparent),
Container( Container(
padding: EdgeInsets.only(left: 65, right: 65), padding: EdgeInsets.only(left: 65, right: 65),
@ -335,8 +312,11 @@ class _BMIState extends State<BMI> with Trans {
keyboardType: TextInputType.numberWithOptions(decimal: false), keyboardType: TextInputType.numberWithOptions(decimal: false),
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
onChanged: (value) => onChanged: (value) => {
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}), value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value))),
}),
); );
} else { } else {
return Container(); return Container();
@ -355,7 +335,50 @@ class _BMIState extends State<BMI> with Trans {
width: 10, width: 10,
), ),
Flexible( 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, focusNode: _nodeText1,
decoration: InputDecoration( decoration: InputDecoration(
contentPadding: EdgeInsets.only(left: 15, top: 5, bottom: 5), contentPadding: EdgeInsets.only(left: 15, top: 5, bottom: 5),
@ -373,8 +396,11 @@ class _BMIState extends State<BMI> with Trans {
keyboardType: TextInputType.numberWithOptions(decimal: true), keyboardType: TextInputType.numberWithOptions(decimal: true),
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
onChanged: (value) => onChanged: (value) => {
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))}, value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value))),
},
), ),
), ),
IconButton( IconButton(

View File

@ -216,8 +216,11 @@ class _BMRState extends State<BMR> with Trans {
keyboardType: TextInputType.numberWithOptions(decimal: false), keyboardType: TextInputType.numberWithOptions(decimal: false),
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
onChanged: (value) => onChanged: (value) => {
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value)))}), value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
widget.exerciseBloc.add(ExerciseNewHeightChange(value: double.parse(value))),
}),
); );
} else { } else {
return Container(); return Container();
@ -244,7 +247,10 @@ class _BMRState extends State<BMR> with Trans {
keyboardType: TextInputType.numberWithOptions(decimal: false), keyboardType: TextInputType.numberWithOptions(decimal: false),
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), 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<BMR> with Trans {
keyboardType: TextInputType.numberWithOptions(decimal: true), keyboardType: TextInputType.numberWithOptions(decimal: true),
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]),
onChanged: (value) => onChanged: (value) => {
{value = value.replaceFirst(",", "."), widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value)))}, value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
widget.exerciseBloc.add(ExerciseNewWeightChange(value: double.parse(value))),
},
), ),
), ),
IconButton( IconButton(

View File

@ -257,6 +257,7 @@ class _ExerciseSaveState extends State<ExerciseSave> with Trans {
style: GoogleFonts.archivoBlack(fontSize: 80, color: Colors.yellow[300]), style: GoogleFonts.archivoBlack(fontSize: 80, color: Colors.yellow[300]),
onChanged: (value) => { onChanged: (value) => {
value = value.replaceFirst(",", "."), value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
widget.onUnitQuantityChanged!(value), widget.onUnitQuantityChanged!(value),
}), }),
])); ]));

View File

@ -156,7 +156,11 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> with Trans {
keyboardType: TextInputType.numberWithOptions(decimal: true), keyboardType: TextInputType.numberWithOptions(decimal: true),
textInputAction: TextInputAction.done, textInputAction: TextInputAction.done,
style: GoogleFonts.archivoBlack(fontSize: 20, color: Colors.yellow[300]), 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( SizedBox(

View File

@ -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. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.1.17+80 version: 1.1.17+81
environment: environment:
sdk: ">=2.12.0 <3.0.0" sdk: ">=2.12.0 <3.0.0"