From 366cf7f8a86118e2605487d72de29a483b32cda8 Mon Sep 17 00:00:00 2001 From: bossanyit Date: Tue, 2 Feb 2021 15:27:46 +0100 Subject: [PATCH] WT1.1.5+3 bug fixes --- android/app/build.gradle | 2 +- android/build.gradle | 2 +- i18n/en.json | 7 ++++++- i18n/hu.json | 7 ++++++- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/view/exercise_control_page.dart | 31 ++++++++++++++++++++++++++-- lib/view/exercise_new_page.dart | 2 +- lib/widgets/app_bar.dart | 30 ++++++++++++++++----------- lib/widgets/menu_page_widget.dart | 21 ++++++++++--------- lib/widgets/time_picker.dart | 4 ++-- pubspec.lock | 7 ------- pubspec.yaml | 4 ++-- 12 files changed, 80 insertions(+), 43 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 4132ce4..e7530b8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -74,7 +74,7 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version" implementation 'com.google.firebase:firebase-analytics:18.0.0' implementation 'com.facebook.android:facebook-login:5.15.3' implementation 'com.android.support:multidex:1.0.3' diff --git a/android/build.gradle b/android/build.gradle index 4dcce1a..adc3a5e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.4.10' + ext.kotlin_version = '1.4.21' repositories { google() jcenter() diff --git a/i18n/en.json b/i18n/en.json index 13d9643..3e47569 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -256,6 +256,7 @@ "Based on your weight and height your goal for BMI and weight:":"Based on your bodyweight and height your goal for BMI and weight:", "Body Mass Index":"Body Mass Index", "first step":"first step", + "Step": "Step", "goal":"goal", "Basal Metabolic Rate":"Basal Metabolic Rate", "Resting Metabolic Rate":"Resting Metabolic Rate", @@ -332,5 +333,9 @@ "2 months free":"2 months free", "Development programs":"Development programs", "Suggestions based on your actual status":"Suggestions based on your actual status", - "Special customized training plans":"Special customized training plans" + "Special customized training plans":"Special customized training plans", + + "Or type the time manually:":"Or type the time manually", + "sec":"sec", + "min":"min" } \ No newline at end of file diff --git a/i18n/hu.json b/i18n/hu.json index d21cf55..11c663d 100644 --- a/i18n/hu.json +++ b/i18n/hu.json @@ -328,5 +328,10 @@ "2 months free":"2 hónap ingyen", "Development programs":"Fejlesztési programok", "Suggestions based on your actual status":"Intelligens javaslatok az állapotod alapján", - "Special customized training plans":"Speciális testreszabott edzéstervek" + "Special customized training plans":"Speciális testreszabott edzéstervek", + + "Step": "Lépés:", + "Or type the time manually:":"Vagy jelöld ki az időt kézzel", + "sec":"mp", + "min":"perc" } \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 024b039..5e53191 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 = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -531,7 +531,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -566,7 +566,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = SFJJBDCU6Z; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/view/exercise_control_page.dart b/lib/view/exercise_control_page.dart index b57e9e2..0536877 100644 --- a/lib/view/exercise_control_page.dart +++ b/lib/view/exercise_control_page.dart @@ -275,10 +275,37 @@ class _ExerciseControlPage extends State with Trans { title, style: GoogleFonts.inter(color: Colors.yellow[300], fontSize: 18, fontWeight: FontWeight.bold), ), - Text( + RichText( + text: TextSpan( + style: GoogleFonts.inter( + fontSize: 16, + fontWeight: FontWeight.normal, + color: Colors.yellow[300], + ), + children: [ + TextSpan(text: t("Please repeat with ")), + TextSpan( + text: exerciseBloc.unitQuantity.toStringAsFixed(0) + " " + exerciseBloc.exerciseRepository.exerciseType.unitQuantityUnit, + style: GoogleFonts.inter( + fontSize: 16, + fontWeight: FontWeight.bold, + color: Colors.yellow[400], + ), + ), + TextSpan( + text: t("hu_with") + + " " + + strTimes + + " " + + t( + "times!", + )) + ]), + ), + /* Text( textInstruction, style: GoogleFonts.inter(color: Colors.yellow[300], fontSize: 16), - ), + ), */ Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ diff --git a/lib/view/exercise_new_page.dart b/lib/view/exercise_new_page.dart index e13a0fd..2a2d827 100644 --- a/lib/view/exercise_new_page.dart +++ b/lib/view/exercise_new_page.dart @@ -379,7 +379,7 @@ class _ExerciseNewPageState extends State with Trans, Logging { ), Divider(), Divider(), - Text("Or type the time manually:", style: GoogleFonts.inter(color: Colors.white)), + Text(t("Or type the time manually:"), style: GoogleFonts.inter(color: Colors.white)), TimePickerWidget( onChange: (value) => {print("timer"), bloc.add(ExerciseNewQuantityChange(quantity: value))}, ) diff --git a/lib/widgets/app_bar.dart b/lib/widgets/app_bar.dart index 58704c7..9b06f27 100644 --- a/lib/widgets/app_bar.dart +++ b/lib/widgets/app_bar.dart @@ -157,24 +157,19 @@ class _AppBarNav extends State with SingleTickerProviderStateMixin, C String text = AppLocalizations.of(context).translate("Make your first test"); double fontSize = text.length > 24 ? 13 : 16; return Stack(alignment: Alignment.topLeft, overflow: Overflow.clip, children: [ - Text( - text, - style: TextStyle(fontSize: fontSize, color: colorAnim.value, shadows: [Shadow(color: Colors.purple, blurRadius: 15)]), - ), + GestureDetector( + onTap: () => progressExplanation(), + child: Text( + text, + style: TextStyle(fontSize: fontSize, color: colorAnim.value, shadows: [Shadow(color: Colors.purple, blurRadius: 15)]), + )), ]); } else { return Stack( alignment: Alignment.topLeft, children: [ GestureDetector( - onTap: () => showDialog( - context: context, - builder: (BuildContext context) { - return DialogHTML( - title: AppLocalizations.of(context).translate("Progressindicator for the tests"), - htmlData: AppLocalizations.of(context).translate("Progressindicator_desc"), - ); - }), + onTap: () => progressExplanation(), child: LinearPercentIndicator( width: cWidth / 4, lineHeight: 14.0, @@ -197,4 +192,15 @@ class _AppBarNav extends State with SingleTickerProviderStateMixin, C ); } } + + void progressExplanation() { + showDialog( + context: context, + builder: (BuildContext context) { + return DialogHTML( + title: AppLocalizations.of(context).translate("Progressindicator for the tests"), + htmlData: AppLocalizations.of(context).translate("Progressindicator_desc"), + ); + }); + } } diff --git a/lib/widgets/menu_page_widget.dart b/lib/widgets/menu_page_widget.dart index 7705e52..45183f3 100644 --- a/lib/widgets/menu_page_widget.dart +++ b/lib/widgets/menu_page_widget.dart @@ -93,7 +93,7 @@ class _MenuPageWidgetState extends State with Trans, Logging { WorkoutMenuTree workoutTree = value; _columnChildren.add(Container( padding: EdgeInsets.only(top: 15.0, left: cWidth * 0.04, right: cWidth * 0.04), - height: (cHeight / 3) - cWidth * 0.16, + //height: (cHeight / 3) - cWidth * 0.16, child: Badge( padding: EdgeInsets.all(8), position: BadgePosition.bottomEnd(end: 0), @@ -144,15 +144,16 @@ class _MenuPageWidgetState extends State with Trans, Logging { }); } //delegate: SliverChildListDelegate(_columnChildren), - LiveSliverList sliverList = LiveSliverList( - itemCount: _columnChildren.length, - reAnimateOnVisibility: false, - showItemDuration: Duration(milliseconds: 250), - itemBuilder: (BuildContext context, int index, Animation animation) => FadeTransition( - opacity: animation, - child: _columnChildren[index], - ), - controller: scrollController, + SliverList sliverList = SliverList( + //itemCount: _columnChildren.length, + //reAnimateOnVisibility: false, + //showItemDuration: Duration(milliseconds: 150), + //itemBuilder: (BuildContext context, int index, Animation animation) => FadeTransition( + // opacity: animation, + // child: _columnChildren[index], + //), + //controller: scrollController, + delegate: SliverChildListDelegate(_columnChildren), ); slivers.add(sliverList); diff --git a/lib/widgets/time_picker.dart b/lib/widgets/time_picker.dart index 6987c48..eefeb42 100644 --- a/lib/widgets/time_picker.dart +++ b/lib/widgets/time_picker.dart @@ -37,10 +37,10 @@ class _TimePickerWidgetState extends State with Trans { : 60, (index) => Text( inSeconds - ? '$index sec' + ? '$index ' + t("sec") : inHundredths ? index.toString() + ' "' - : '$index min', + : '$index ' + t('min'), style: TextStyle(color: Colors.yellow[200]))), itemExtent: 40, ); diff --git a/pubspec.lock b/pubspec.lock index 0bee397..2449e0a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -426,13 +426,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.6" - flutter_fadein: - dependency: "direct main" - description: - name: flutter_fadein - url: "https://pub.dartlang.org" - source: hosted - version: "1.1.1" flutter_form_bloc: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index de27fa5..0659ba5 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.5+49 +version: 1.1.5+51 environment: sdk: ">=2.7.0 <3.0.0" @@ -62,7 +62,7 @@ dependencies: apple_sign_in: ^0.1.0 crypto: ^2.1.5 transparent_image: ^1.0.0 - flutter_fadein: ^1.1.1 + #flutter_fadein: ^1.1.1 auto_animated: ^2.1.0 flurry: ^0.0.7