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",
"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",
"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;
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";

View File

@ -211,53 +211,21 @@ class ExerciseNewBloc extends Bloc<ExerciseNewEvent, ExerciseNewState> 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);

View File

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

View File

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

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_bkg': 'dark',
'sales_page_offer': 'monthly',
'please_log_in': '',
});
RemoteConfigValue(null, ValueSource.valueStatic);
Cache().setRemoteConfig(remoteConfig);

View File

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

View File

@ -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>[
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())),

View File

@ -251,7 +251,7 @@ class _ExerciseNewPageState extends State<ExerciseNewPage> 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) {

View File

@ -244,6 +244,7 @@ class _ExercisePlanDetailAddPage extends State<ExercisePlanDetailAddPage> with T
if (value.isNotEmpty)
{
value = value.replaceFirst(",", "."),
value = value.replaceAll(RegExp(r'[^0-9.]'), ""),
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,
Navigator.of(context).pushNamed('mydevelopmentBodyPage', arguments: args)
}
else
{}
},
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),
Container(
padding: EdgeInsets.only(left: 65, right: 65),
@ -335,8 +312,11 @@ class _BMIState extends State<BMI> 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<BMI> 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<BMI> 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(

View File

@ -216,8 +216,11 @@ class _BMRState extends State<BMR> 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<BMR> 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<BMR> 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(

View File

@ -257,6 +257,7 @@ class _ExerciseSaveState extends State<ExerciseSave> 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),
}),
]));

View File

@ -156,7 +156,11 @@ class _InputDialogState<Event> extends State<InputDialog<Event>> 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(

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.
# 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"