diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index f2872cf4..4f8d4d24 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 9.0 + 11.0 diff --git a/ios/Podfile b/ios/Podfile index 1e8c3c90..2c068c40 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index b013bfe1..8169503c 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,70 +1,71 @@ PODS: - - camera (0.0.1): - - Flutter - Flutter (1.0.0) + - flutter_barcode_scanner (2.0.0): + - Flutter - flutter_keyboard_visibility (0.0.1): - Flutter - - image_picker (0.0.1): + - image_picker_ios (0.0.1): - Flutter - - package_info (0.0.1): + - integration_test (0.0.1): - Flutter - - shared_preferences_ios (0.0.1): + - package_info_plus (0.4.5): - Flutter + - rive_common (0.0.1): + - Flutter + - shared_preferences_foundation (0.0.1): + - Flutter + - FlutterMacOS - url_launcher_ios (0.0.1): - Flutter - - video_player (0.0.1): - - Flutter - - wakelock (0.0.1): - - Flutter - - webview_flutter_wkwebview (0.0.1): + - video_player_avfoundation (0.0.1): - Flutter DEPENDENCIES: - - camera (from `.symlinks/plugins/camera/ios`) - Flutter (from `Flutter`) + - flutter_barcode_scanner (from `.symlinks/plugins/flutter_barcode_scanner/ios`) - flutter_keyboard_visibility (from `.symlinks/plugins/flutter_keyboard_visibility/ios`) - - image_picker (from `.symlinks/plugins/image_picker/ios`) - - package_info (from `.symlinks/plugins/package_info/ios`) - - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) + - image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`) + - integration_test (from `.symlinks/plugins/integration_test/ios`) + - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`) + - rive_common (from `.symlinks/plugins/rive_common/ios`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - - video_player (from `.symlinks/plugins/video_player/ios`) - - wakelock (from `.symlinks/plugins/wakelock/ios`) - - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) + - video_player_avfoundation (from `.symlinks/plugins/video_player_avfoundation/ios`) EXTERNAL SOURCES: - camera: - :path: ".symlinks/plugins/camera/ios" Flutter: :path: Flutter + flutter_barcode_scanner: + :path: ".symlinks/plugins/flutter_barcode_scanner/ios" flutter_keyboard_visibility: :path: ".symlinks/plugins/flutter_keyboard_visibility/ios" - image_picker: - :path: ".symlinks/plugins/image_picker/ios" - package_info: - :path: ".symlinks/plugins/package_info/ios" - shared_preferences_ios: - :path: ".symlinks/plugins/shared_preferences_ios/ios" + image_picker_ios: + :path: ".symlinks/plugins/image_picker_ios/ios" + integration_test: + :path: ".symlinks/plugins/integration_test/ios" + package_info_plus: + :path: ".symlinks/plugins/package_info_plus/ios" + rive_common: + :path: ".symlinks/plugins/rive_common/ios" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/ios" url_launcher_ios: :path: ".symlinks/plugins/url_launcher_ios/ios" - video_player: - :path: ".symlinks/plugins/video_player/ios" - wakelock: - :path: ".symlinks/plugins/wakelock/ios" - webview_flutter_wkwebview: - :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" + video_player_avfoundation: + :path: ".symlinks/plugins/video_player_avfoundation/ios" SPEC CHECKSUMS: - camera: fe33292aff715a981eb34d7ce7b35b54337ff34c - Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + flutter_barcode_scanner: 7a1144744c28dc0c57a8de7218ffe5ec59a9e4bf flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 - image_picker: 9aa50e1d8cdacdbed739e925b7eea16d014367e6 - package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 - shared_preferences_ios: aef470a42dc4675a1cdd50e3158b42e3d1232b32 - url_launcher_ios: 02f1989d4e14e998335b02b67a7590fa34f971af - video_player: ecd305f42e9044793efd34846e1ce64c31ea6fcb - wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f - webview_flutter_wkwebview: 005fbd90c888a42c5690919a1527ecc6649e1162 + image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5 + integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 + package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e + rive_common: 60ae7896ab40f9513974f36f015de33f70d2c5c5 + shared_preferences_foundation: 986fc17f3d3251412d18b0265f9c64113a8c2472 + url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4 + video_player_avfoundation: 81e49bb3d9fb63dccf9fa0f6d877dc3ddbeac126 -PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c +PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 -COCOAPODS: 1.11.2 +COCOAPODS: 1.12.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index d44478a3..7bccdc01 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 50; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -199,6 +199,7 @@ /* Begin PBXShellScriptBuildPhase section */ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -252,6 +253,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); @@ -339,7 +341,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -425,7 +427,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -474,7 +476,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index b8ebd6ec..9aa740a2 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -43,5 +43,7 @@ CADisableMinimumFrameDurationOnPhone + UIApplicationSupportsIndirectInputEvents + diff --git a/lib/helpers/consts.dart b/lib/helpers/consts.dart index 4dcfb723..84f148b3 100644 --- a/lib/helpers/consts.dart +++ b/lib/helpers/consts.dart @@ -36,8 +36,12 @@ const DEFAULT_WEIGHT_UNIT = 1; /// Default impression for a workout session (neutral) const DEFAULT_IMPRESSION = 2; -/// Default weight unit is "repetition" -const DEFAULT_REPETITION_UNIT = 1; +// Weight and repetition units for the workout logs +const REP_UNIT_REPETITIONS = 1; +const REP_UNIT_TILL_FAILURE = 2; + +const WEIGHT_UNIT_KG = 1; +const WEIGHT_UNIT_LB = 2; /// Time to locally cache values such as ingredients, etc const DAYS_TO_CACHE = 20; diff --git a/lib/helpers/i18n.dart b/lib/helpers/i18n.dart index 9820f740..9cf146fd 100644 --- a/lib/helpers/i18n.dart +++ b/lib/helpers/i18n.dart @@ -28,6 +28,9 @@ String getTranslation(String value, BuildContext context) { case 'Biceps': return AppLocalizations.of(context).biceps; + case 'Body Weight': + return AppLocalizations.of(context).body_weight; + case 'Calves': return AppLocalizations.of(context).calves; @@ -58,21 +61,27 @@ String getTranslation(String value, BuildContext context) { case 'Kilometers': return AppLocalizations.of(context).kilometers; + case 'Kilometers Per Hour': + return AppLocalizations.of(context).kilometers_per_hour; + case 'Lats': return AppLocalizations.of(context).lats; case 'Legs': return AppLocalizations.of(context).legs; - case 'Lower back': - return AppLocalizations.of(context).lower_back; - case 'Miles': return AppLocalizations.of(context).miles; + case 'Miles Per Hour': + return AppLocalizations.of(context).miles_per_hour; + case 'Minutes': return AppLocalizations.of(context).minutes; + case 'Plates': + return AppLocalizations.of(context).plates; + case 'Pull-up bar': return AppLocalizations.of(context).pull_up_bar; @@ -100,6 +109,12 @@ String getTranslation(String value, BuildContext context) { case 'Until Failure': return AppLocalizations.of(context).until_failure; + case 'kg': + return AppLocalizations.of(context).kg; + + case 'lb': + return AppLocalizations.of(context).lb; + case 'none (bodyweight exercise)': return AppLocalizations.of(context).none__bodyweight_exercise_; diff --git a/lib/helpers/misc.dart b/lib/helpers/misc.dart index 805ec1ed..26c34cc2 100644 --- a/lib/helpers/misc.dart +++ b/lib/helpers/misc.dart @@ -42,7 +42,7 @@ String repText( // rather "8 repetitions". If there is weight we want to output "8 x 50kg", // since the repetitions are implied. If other units are used, we always // print them - if (repetitionUnitObj.id != DEFAULT_REPETITION_UNIT || weight == 0 || weight == null) { + if (repetitionUnitObj.id != REP_UNIT_REPETITIONS || weight == 0 || weight == null) { out.add(repetitionUnitObj.name); } } diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index f0fd2187..65f790f3 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -635,37 +635,150 @@ } }, "cacheWarning": "Due to caching it might take some time till the changes are visible throughout the application.", - "abs": "Abs", - "arms": "Arms", - "back": "Back", - "barbell": "Barbell", - "bench": "Bench", - "biceps": "Biceps", - "calves": "Calves", - "cardio": "Cardio", - "chest": "Chest", - "dumbbell": "Dumbbell", - "glutes": "Glutes", - "gym_mat": "Gym mat", - "hamstrings": "Hamstrings", - "incline_bench": "Incline bench", - "kettlebell": "Kettlebell", - "kilometers": "Kilometers", - "lats": "Lats", - "legs": "Legs", - "lower_back": "Lower back", - "miles": "Miles", - "minutes": "Minutes", - "pull_up_bar": "Pull-up bar", - "quads": "Quads", - "repetitions": "Repetitions", - "sz_bar": "SZ-Bar", - "seconds": "Seconds", - "shoulders": "Shoulders", - "swiss_ball": "Swiss Ball", - "triceps": "Triceps", - "until_failure": "Until Failure", - "none__bodyweight_exercise_": "none (bodyweight exercise)", "textPromptTitle": "Ready to start?", - "textPromptSubheading": "Press the action button to begin" + "textPromptSubheading": "Press the action button to begin", + "abs": "Abs", + "@abs": { + "description": "Generated entry for translation for server strings" + }, + "arms": "Arms", + "@arms": { + "description": "Generated entry for translation for server strings" + }, + "back": "Back", + "@back": { + "description": "Generated entry for translation for server strings" + }, + "barbell": "Barbell", + "@barbell": { + "description": "Generated entry for translation for server strings" + }, + "bench": "Bench", + "@bench": { + "description": "Generated entry for translation for server strings" + }, + "biceps": "Biceps", + "@biceps": { + "description": "Generated entry for translation for server strings" + }, + "body_weight": "Body Weight", + "@body_weight": { + "description": "Generated entry for translation for server strings" + }, + "calves": "Calves", + "@calves": { + "description": "Generated entry for translation for server strings" + }, + "cardio": "Cardio", + "@cardio": { + "description": "Generated entry for translation for server strings" + }, + "chest": "Chest", + "@chest": { + "description": "Generated entry for translation for server strings" + }, + "dumbbell": "Dumbbell", + "@dumbbell": { + "description": "Generated entry for translation for server strings" + }, + "glutes": "Glutes", + "@glutes": { + "description": "Generated entry for translation for server strings" + }, + "gym_mat": "Gym mat", + "@gym_mat": { + "description": "Generated entry for translation for server strings" + }, + "hamstrings": "Hamstrings", + "@hamstrings": { + "description": "Generated entry for translation for server strings" + }, + "incline_bench": "Incline bench", + "@incline_bench": { + "description": "Generated entry for translation for server strings" + }, + "kettlebell": "Kettlebell", + "@kettlebell": { + "description": "Generated entry for translation for server strings" + }, + "kilometers": "Kilometers", + "@kilometers": { + "description": "Generated entry for translation for server strings" + }, + "kilometers_per_hour": "Kilometers Per Hour", + "@kilometers_per_hour": { + "description": "Generated entry for translation for server strings" + }, + "lats": "Lats", + "@lats": { + "description": "Generated entry for translation for server strings" + }, + "legs": "Legs", + "@legs": { + "description": "Generated entry for translation for server strings" + }, + "miles": "Miles", + "@miles": { + "description": "Generated entry for translation for server strings" + }, + "miles_per_hour": "Miles Per Hour", + "@miles_per_hour": { + "description": "Generated entry for translation for server strings" + }, + "minutes": "Minutes", + "@minutes": { + "description": "Generated entry for translation for server strings" + }, + "plates": "Plates", + "@plates": { + "description": "Generated entry for translation for server strings" + }, + "pull_up_bar": "Pull-up bar", + "@pull_up_bar": { + "description": "Generated entry for translation for server strings" + }, + "quads": "Quads", + "@quads": { + "description": "Generated entry for translation for server strings" + }, + "repetitions": "Repetitions", + "@repetitions": { + "description": "Generated entry for translation for server strings" + }, + "sz_bar": "SZ-Bar", + "@sz_bar": { + "description": "Generated entry for translation for server strings" + }, + "seconds": "Seconds", + "@seconds": { + "description": "Generated entry for translation for server strings" + }, + "shoulders": "Shoulders", + "@shoulders": { + "description": "Generated entry for translation for server strings" + }, + "swiss_ball": "Swiss Ball", + "@swiss_ball": { + "description": "Generated entry for translation for server strings" + }, + "triceps": "Triceps", + "@triceps": { + "description": "Generated entry for translation for server strings" + }, + "until_failure": "Until Failure", + "@until_failure": { + "description": "Generated entry for translation for server strings" + }, + "kg": "kg", + "@kg": { + "description": "Generated entry for translation for server strings" + }, + "lb": "lb", + "@lb": { + "description": "Generated entry for translation for server strings" + }, + "none__bodyweight_exercise_": "none (bodyweight exercise)", + "@none__bodyweight_exercise_": { + "description": "Generated entry for translation for server strings" + } } diff --git a/lib/l10n/app_tr.arb b/lib/l10n/app_tr.arb index 8ce2d8fc..07ece58a 100644 --- a/lib/l10n/app_tr.arb +++ b/lib/l10n/app_tr.arb @@ -717,5 +717,9 @@ "cacheWarning": "Önbelleğe alma nedeniyle değişikliklerin uygulama genelinde görünür olması biraz zaman alabilir.", "@cacheWarning": {}, "searchNamesInEnglish": "Ayrıca İngilizce adları da arayın", - "@searchNamesInEnglish": {} + "@searchNamesInEnglish": {}, + "textPromptTitle": "Başlamaya hazır mısınız?", + "@textPromptTitle": {}, + "textPromptSubheading": "Başlamak için eylem düğmesine basın", + "@textPromptSubheading": {} } diff --git a/lib/l10n/app_uk.arb b/lib/l10n/app_uk.arb index f9bfc442..d9b7f2eb 100644 --- a/lib/l10n/app_uk.arb +++ b/lib/l10n/app_uk.arb @@ -717,5 +717,9 @@ "cacheWarning": "Через кешування може знадобитися деякий час, перш ніж зміни стануть видимими у всьому застосунку.", "@cacheWarning": {}, "searchNamesInEnglish": "Також шукайте імена англійською мовою", - "@searchNamesInEnglish": {} + "@searchNamesInEnglish": {}, + "textPromptTitle": "Готові почати?", + "@textPromptTitle": {}, + "textPromptSubheading": "Натисніть кнопку дії, щоб почати", + "@textPromptSubheading": {} } diff --git a/lib/l10n/app_zh.arb b/lib/l10n/app_zh.arb index 1c0f0e58..e7c4b276 100644 --- a/lib/l10n/app_zh.arb +++ b/lib/l10n/app_zh.arb @@ -159,7 +159,7 @@ }, "loginInstead": "登录", "@loginInstead": {}, - "registerInstead": "注册", + "registerInstead": "没有帐户?点击注册", "@registerInstead": {}, "reset": "重置", "@reset": { @@ -556,5 +556,11 @@ "logged": "已记录", "@logged": { "description": "Header for the column of 'logged' nutritional values, i.e. what was eaten" + }, + "userProfile": "账户", + "@userProfile": {}, + "exerciseName": "锻炼名", + "@exerciseName": { + "description": "Label for the name of a workout exercise" } } diff --git a/lib/providers/workout_plans.dart b/lib/providers/workout_plans.dart index f00048a4..47dcea35 100644 --- a/lib/providers/workout_plans.dart +++ b/lib/providers/workout_plans.dart @@ -85,7 +85,7 @@ class WorkoutPlansProvider with ChangeNotifier { /// Return the default weight unit (reps) RepetitionUnit get defaultRepetitionUnit { - return _repetitionUnit.firstWhere((element) => element.id == DEFAULT_REPETITION_UNIT); + return _repetitionUnit.firstWhere((element) => element.id == REP_UNIT_REPETITIONS); } List getPlans() { diff --git a/lib/theme/theme.dart b/lib/theme/theme.dart index 4a4b1786..89f98fb9 100644 --- a/lib/theme/theme.dart +++ b/lib/theme/theme.dart @@ -95,7 +95,9 @@ final ThemeData wgerTheme = ThemeData( */ textButtonTheme: TextButtonThemeData( style: TextButton.styleFrom( - primary: wgerPrimaryButtonColor, +// This primary is deprecated and should not be used +// primary: wgerPrimaryButtonColor, + foregroundColor: wgerPrimaryButtonColor, ), ), outlinedButtonTheme: OutlinedButtonThemeData( diff --git a/pubspec.yaml b/pubspec.yaml index a3daa69c..eca23559 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,19 +39,19 @@ dependencies: equatable: ^2.0.5 flutter_calendar_carousel: ^2.4.1 flutter_html: ^3.0.0-alpha.6 - flutter_typeahead: ^4.3.7 + flutter_typeahead: ^4.3.8 font_awesome_flutter: ^10.4.0 http: ^0.13.5 image_picker: ^0.8.7+3 intl: ^0.17.0 - json_annotation: ^4.8.0 + json_annotation: ^4.8.1 version: ^3.0.2 - package_info_plus: ^3.1.0 + package_info_plus: ^3.1.2 provider: ^6.0.5 rive: ^0.10.4 - shared_preferences: ^2.1.0 + shared_preferences: ^2.1.1 table_calendar: ^3.0.8 - url_launcher: ^6.1.10 + url_launcher: ^6.1.11 flutter_barcode_scanner: ^2.0.0 video_player: ^2.6.1 flutter_staggered_grid_view: ^0.6.2 @@ -67,7 +67,7 @@ dev_dependencies: sdk: flutter build_runner: ^2.3.3 flutter_launcher_icons: ^0.13.1 - json_serializable: ^6.6.1 + json_serializable: ^6.6.2 mockito: ^5.4.0 network_image_mock: ^2.1.1 flutter_lints: ^2.0.1