diff --git a/README.md b/README.md index d8a99c424d2..1a81ca581a6 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ - Make sure you have installed flutter and all the requirements - [Official flutter installation guide](https://docs.flutter.dev/get-started/install) -- Currently, the app uses the following version of Flutter (3.22.x). +- Currently, the app uses the latest stable version of Flutter (3.19.x). We have predefined run configurations for Android Studio and Visual Studio Code diff --git a/flutter-version.txt b/flutter-version.txt index dbc9520ba41..0bc8e967b83 100644 --- a/flutter-version.txt +++ b/flutter-version.txt @@ -1 +1 @@ -3.22.2 \ No newline at end of file +3.19.5 \ No newline at end of file diff --git a/packages/app_store/apple_app_store/pubspec.yaml b/packages/app_store/apple_app_store/pubspec.yaml index 0a6b0494448..ed12d33a943 100644 --- a/packages/app_store/apple_app_store/pubspec.yaml +++ b/packages/app_store/apple_app_store/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/app_store/google_play/pubspec.yaml b/packages/app_store/google_play/pubspec.yaml index 54161b2443e..9f6c287d4fa 100644 --- a/packages/app_store/google_play/pubspec.yaml +++ b/packages/app_store/google_play/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/app_store/shared/pubspec.yaml b/packages/app_store/shared/pubspec.yaml index 86fec92bc7f..4978f448a6c 100644 --- a/packages/app_store/shared/pubspec.yaml +++ b/packages/app_store/shared/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/app_store/uri_store/pubspec.yaml b/packages/app_store/uri_store/pubspec.yaml index 1e661bdb92a..5b5d99659be 100644 --- a/packages/app_store/uri_store/pubspec.yaml +++ b/packages/app_store/uri_store/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.1 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/scanner/ml_kit/pubspec.yaml b/packages/scanner/ml_kit/pubspec.yaml index 753b8caafd2..5b69d47d97a 100644 --- a/packages/scanner/ml_kit/pubspec.yaml +++ b/packages/scanner/ml_kit/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/scanner/shared/pubspec.yaml b/packages/scanner/shared/pubspec.yaml index 7fa9a28d1f0..7730dc8abaf 100644 --- a/packages/scanner/shared/pubspec.yaml +++ b/packages/scanner/shared/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/scanner/zxing/pubspec.yaml b/packages/scanner/zxing/pubspec.yaml index 0e32939a7b4..76b0988cd50 100644 --- a/packages/scanner/zxing/pubspec.yaml +++ b/packages/scanner/zxing/pubspec.yaml @@ -4,7 +4,7 @@ version: 1.0.0 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.0 <4.0.0' dependencies: flutter: diff --git a/packages/smooth_app/lib/generic_lib/buttons/smooth_simple_button.dart b/packages/smooth_app/lib/generic_lib/buttons/smooth_simple_button.dart index 52dae9e156d..cc978a528ab 100644 --- a/packages/smooth_app/lib/generic_lib/buttons/smooth_simple_button.dart +++ b/packages/smooth_app/lib/generic_lib/buttons/smooth_simple_button.dart @@ -33,19 +33,19 @@ class SmoothSimpleButton extends StatelessWidget { style: ButtonStyle( backgroundColor: buttonColor == null ? null - : WidgetStateProperty.all(buttonColor!), - shape: WidgetStateProperty.all( + : MaterialStateProperty.all(buttonColor!), + shape: MaterialStateProperty.all( RoundedRectangleBorder(borderRadius: borderRadius), ), overlayColor: context.read().isAmoledTheme - ? WidgetStateProperty.resolveWith((Set states) { - return states.contains(WidgetState.pressed) + ? MaterialStateProperty.resolveWith((Set states) { + return states.contains(MaterialState.pressed) ? Theme.of(context).colorScheme.primary.withOpacity(0.3) : null; }) : null, side: context.read().isAmoledTheme - ? WidgetStateProperty.all( + ? MaterialStateProperty.all( const BorderSide(color: Colors.white), ) : null, diff --git a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart index 0d03fca3a89..f267cc1dba6 100644 --- a/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart +++ b/packages/smooth_app/lib/generic_lib/dialogs/smooth_alert_dialog.dart @@ -213,7 +213,7 @@ class _SmoothDialogTitle extends StatelessWidget { ], ), ), - Divider(color: Theme.of(context).colorScheme.onSurface), + Divider(color: Theme.of(context).colorScheme.onBackground), const SizedBox(height: 12), ], ); diff --git a/packages/smooth_app/lib/pages/hunger_games/question_answers_options.dart b/packages/smooth_app/lib/pages/hunger_games/question_answers_options.dart index e1ee8172f20..dcea8df0085 100755 --- a/packages/smooth_app/lib/pages/hunger_games/question_answers_options.dart +++ b/packages/smooth_app/lib/pages/hunger_games/question_answers_options.dart @@ -108,8 +108,8 @@ class QuestionAnswersOptions extends StatelessWidget { child: TextButton.icon( onPressed: () => onAnswer(insightAnnotation), style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(backgroundColor), - shape: WidgetStateProperty.all( + backgroundColor: MaterialStateProperty.all(backgroundColor), + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: ROUNDED_BORDER_RADIUS, ), diff --git a/packages/smooth_app/lib/pages/image_crop_page.dart b/packages/smooth_app/lib/pages/image_crop_page.dart index 67f902807c1..614b7431c0a 100644 --- a/packages/smooth_app/lib/pages/image_crop_page.dart +++ b/packages/smooth_app/lib/pages/image_crop_page.dart @@ -225,13 +225,13 @@ class _ImageSourceButton extends StatelessWidget { child: OutlinedButton( onPressed: onPressed, style: ButtonStyle( - side: WidgetStatePropertyAll( + side: MaterialStatePropertyAll( BorderSide(color: primaryColor), ), - padding: const WidgetStatePropertyAll( + padding: const MaterialStatePropertyAll( EdgeInsets.symmetric(vertical: LARGE_SPACE), ), - shape: WidgetStatePropertyAll( + shape: MaterialStatePropertyAll( RoundedRectangleBorder( borderRadius: ROUNDED_BORDER_RADIUS, side: BorderSide(color: primaryColor), diff --git a/packages/smooth_app/lib/pages/locations/location_query_page.dart b/packages/smooth_app/lib/pages/locations/location_query_page.dart index 61524e27a5e..250f35e0172 100644 --- a/packages/smooth_app/lib/pages/locations/location_query_page.dart +++ b/packages/smooth_app/lib/pages/locations/location_query_page.dart @@ -110,8 +110,8 @@ class _LocationQueryPageState extends State data: ListTileThemeData( titleTextStyle: const TextStyle(fontSize: 20.0), minLeadingWidth: 18.0, - iconColor: Theme.of(context).colorScheme.onSurface, - textColor: Theme.of(context).colorScheme.onSurface, + iconColor: Theme.of(context).colorScheme.onBackground, + textColor: Theme.of(context).colorScheme.onBackground, ), child: ListView.builder( itemBuilder: (BuildContext context, int index) => diff --git a/packages/smooth_app/lib/pages/onboarding/onboarding_bottom_bar.dart b/packages/smooth_app/lib/pages/onboarding/onboarding_bottom_bar.dart index 089aed5f5ef..57e9b0abf83 100644 --- a/packages/smooth_app/lib/pages/onboarding/onboarding_bottom_bar.dart +++ b/packages/smooth_app/lib/pages/onboarding/onboarding_bottom_bar.dart @@ -90,11 +90,12 @@ class OnboardingBottomButton extends StatelessWidget { key: nextKey, onPressed: onPressed, style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(backgroundColor), + backgroundColor: MaterialStateProperty.all(backgroundColor), overlayColor: backgroundColor == Colors.white - ? WidgetStateProperty.all(Theme.of(context).splashColor) + ? MaterialStateProperty.all( + Theme.of(context).splashColor) : null, - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(40))), ), diff --git a/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart b/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart index e8ecaa7c70b..49b3b784299 100644 --- a/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart +++ b/packages/smooth_app/lib/pages/onboarding/v2/onboarding_bottom_hills.dart @@ -62,10 +62,10 @@ class OnboardingBottomHills extends StatelessWidget { end: 15.0, child: TextButton( style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( + backgroundColor: MaterialStateProperty.all( Colors.white, ), - padding: WidgetStateProperty.all( + padding: MaterialStateProperty.all( const EdgeInsetsDirectional.only( start: LARGE_SPACE + 1.0, end: LARGE_SPACE, @@ -73,20 +73,20 @@ class OnboardingBottomHills extends StatelessWidget { bottom: SMALL_SPACE, ), ), - elevation: WidgetStateProperty.all(4.0), - iconColor: WidgetStateProperty.all( + elevation: MaterialStateProperty.all(4.0), + iconColor: MaterialStateProperty.all( colors.orange, ), - foregroundColor: WidgetStateProperty.all( + foregroundColor: MaterialStateProperty.all( colors.orange, ), - iconSize: WidgetStateProperty.all(21.0), - shape: WidgetStateProperty.all( + iconSize: MaterialStateProperty.all(21.0), + shape: MaterialStateProperty.all( RoundedRectangleBorder( borderRadius: BorderRadius.circular(20.0), ), ), - shadowColor: WidgetStateProperty.all( + shadowColor: MaterialStateProperty.all( Colors.black.withOpacity(0.50), ), ), diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_account.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_account.dart index 3121ddff96c..94ad1b57cb3 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_account.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_account.dart @@ -147,10 +147,10 @@ class UserPreferencesAccount extends AbstractUserPreferences { child: ElevatedButton( onPressed: () async => _goToLoginPage(), style: ButtonStyle( - minimumSize: WidgetStateProperty.all( + minimumSize: MaterialStateProperty.all( Size(size.width * 0.5, themeData.buttonTheme.height + 10), ), - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_connect.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_connect.dart index 1e4e0f169f5..8704baf50fa 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_connect.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_connect.dart @@ -111,7 +111,7 @@ class UserPreferencesConnect extends AbstractUserPreferences { 'assets/preferences/x-logo.svg', width: DEFAULT_ICON_SIZE, colorFilter: ui.ColorFilter.mode( - Theme.of(context).colorScheme.onSurface, + Theme.of(context).colorScheme.onBackground, ui.BlendMode.srcIn, ), package: AppHelper.APP_PACKAGE, diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_rate_us.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_rate_us.dart index 3600c1330ab..cba7fc5eefe 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_rate_us.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_rate_us.dart @@ -50,10 +50,10 @@ class UserPreferencesRateUs extends StatelessWidget { content: Text( appLocalizations.error_occurred, textAlign: TextAlign.center, - style: TextStyle(color: themeData.colorScheme.surface), + style: TextStyle(color: themeData.colorScheme.background), ), behavior: SnackBarBehavior.floating, - backgroundColor: themeData.colorScheme.onSurface, + backgroundColor: themeData.colorScheme.onBackground, ), ); } diff --git a/packages/smooth_app/lib/pages/preferences/user_preferences_share_with_friends.dart b/packages/smooth_app/lib/pages/preferences/user_preferences_share_with_friends.dart index 44840fa1c28..6e9875ff5c3 100644 --- a/packages/smooth_app/lib/pages/preferences/user_preferences_share_with_friends.dart +++ b/packages/smooth_app/lib/pages/preferences/user_preferences_share_with_friends.dart @@ -44,11 +44,11 @@ class UserPreferencesShareWithFriends extends StatelessWidget { appLocalizations.error, textAlign: TextAlign.center, style: TextStyle( - color: themeData.colorScheme.surface, + color: themeData.colorScheme.background, ), ), behavior: SnackBarBehavior.floating, - backgroundColor: themeData.colorScheme.onSurface, + backgroundColor: themeData.colorScheme.onBackground, ), ); } diff --git a/packages/smooth_app/lib/pages/product/common/product_list_page.dart b/packages/smooth_app/lib/pages/product/common/product_list_page.dart index 59d9b4e671a..d831b6c70bc 100644 --- a/packages/smooth_app/lib/pages/product/common/product_list_page.dart +++ b/packages/smooth_app/lib/pages/product/common/product_list_page.dart @@ -267,7 +267,7 @@ class _ProductListPageState extends State appLocalizations.product_list_empty_message, textAlign: TextAlign.center, style: themeData.textTheme.bodyMedium?.apply( - color: themeData.colorScheme.onSurface, + color: themeData.colorScheme.onBackground, ), ), EMPTY_WIDGET, diff --git a/packages/smooth_app/lib/pages/product/edit_image_button.dart b/packages/smooth_app/lib/pages/product/edit_image_button.dart index dd30c53526f..bc644102552 100644 --- a/packages/smooth_app/lib/pages/product/edit_image_button.dart +++ b/packages/smooth_app/lib/pages/product/edit_image_button.dart @@ -33,20 +33,20 @@ class EditImageButton extends StatelessWidget { child: OutlinedButton.icon( icon: Icon(iconData), style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(colorScheme.onPrimary), - shape: WidgetStateProperty.all( + backgroundColor: MaterialStateProperty.all(colorScheme.onPrimary), + shape: MaterialStateProperty.all( const RoundedRectangleBorder(borderRadius: ROUNDED_BORDER_RADIUS), ), side: borderWidth == null ? null - : WidgetStateBorderSide.resolveWith( + : MaterialStateBorderSide.resolveWith( (_) => BorderSide( color: colorScheme.primary, width: borderWidth!, ), ), padding: _centerContent - ? WidgetStateProperty.all( + ? MaterialStateProperty.all( const EdgeInsets.symmetric( vertical: LARGE_SPACE, ), diff --git a/packages/smooth_app/lib/pages/product/edit_new_packagings.dart b/packages/smooth_app/lib/pages/product/edit_new_packagings.dart index 4c0a003929b..6c4e248066c 100644 --- a/packages/smooth_app/lib/pages/product/edit_new_packagings.dart +++ b/packages/smooth_app/lib/pages/product/edit_new_packagings.dart @@ -324,7 +324,7 @@ Color _getSmoothCardColorAlternate(final BuildContext context, int index) { if (index.isOdd) { cardColor = PRIMARY_GREY_COLOR; } else { - cardColor = darkColorScheme.surface; + cardColor = darkColorScheme.background; } } diff --git a/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_page.dart b/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_page.dart index d78a52cce5e..1f737bc5744 100644 --- a/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_page.dart +++ b/packages/smooth_app/lib/pages/product/edit_ocr/edit_ocr_page.dart @@ -294,7 +294,7 @@ class _EditOcrPageState extends State with UpToDateMixin { flex: 1, child: DecoratedBox( decoration: BoxDecoration( - color: Theme.of(context).colorScheme.surface, + color: Theme.of(context).colorScheme.background, borderRadius: const BorderRadiusDirectional.only( topStart: ANGULAR_RADIUS, topEnd: ANGULAR_RADIUS, diff --git a/packages/smooth_app/lib/pages/product/new_product_page.dart b/packages/smooth_app/lib/pages/product/new_product_page.dart index e20901edfa2..ee44bec4fb5 100644 --- a/packages/smooth_app/lib/pages/product/new_product_page.dart +++ b/packages/smooth_app/lib/pages/product/new_product_page.dart @@ -416,11 +416,11 @@ class _ProductPageState extends State ), child: ElevatedButton( style: ButtonStyle( - padding: WidgetStateProperty.all( + padding: MaterialStateProperty.all( const EdgeInsets.symmetric( horizontal: VERY_LARGE_SPACE, vertical: MEDIUM_SPACE), ), - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: ROUNDED_BORDER_RADIUS, ), diff --git a/packages/smooth_app/lib/pages/product/nutrition_add_nutrient_button.dart b/packages/smooth_app/lib/pages/product/nutrition_add_nutrient_button.dart index afa30d2b80d..86b1a5dea6a 100644 --- a/packages/smooth_app/lib/pages/product/nutrition_add_nutrient_button.dart +++ b/packages/smooth_app/lib/pages/product/nutrition_add_nutrient_button.dart @@ -99,7 +99,7 @@ class NutritionAddNutrientButton extends StatelessWidget { } }, style: ButtonStyle( - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: ROUNDED_BORDER_RADIUS, side: BorderSide.none, diff --git a/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart b/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart index 6fed13681ec..3a872cbbf39 100644 --- a/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart +++ b/packages/smooth_app/lib/pages/product/nutrition_page_loaded.dart @@ -322,7 +322,7 @@ class _NutritionPageLoadedState extends State value: _nutritionContainer.noNutritionData, onChanged: (final bool value) => setState(() => _nutritionContainer.noNutritionData = value), - trackColor: WidgetStateProperty.all( + trackColor: MaterialStateProperty.all( Theme.of(context).colorScheme.onPrimary), ), ), diff --git a/packages/smooth_app/lib/pages/product/product_incomplete_card.dart b/packages/smooth_app/lib/pages/product/product_incomplete_card.dart index c60c7897639..ceba846b333 100644 --- a/packages/smooth_app/lib/pages/product/product_incomplete_card.dart +++ b/packages/smooth_app/lib/pages/product/product_incomplete_card.dart @@ -111,13 +111,13 @@ class ProductIncompleteCard extends StatelessWidget { ), ), style: ButtonStyle( - backgroundColor: WidgetStateProperty.all( + backgroundColor: MaterialStateProperty.all( colorScheme.primary, ), - foregroundColor: WidgetStateProperty.all( + foregroundColor: MaterialStateProperty.all( colorScheme.onPrimary, ), - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder(borderRadius: ANGULAR_BORDER_RADIUS), ), ), diff --git a/packages/smooth_app/lib/pages/product/product_question_answers_options.dart b/packages/smooth_app/lib/pages/product/product_question_answers_options.dart index d9e1c31e72a..efeac877bd0 100644 --- a/packages/smooth_app/lib/pages/product/product_question_answers_options.dart +++ b/packages/smooth_app/lib/pages/product/product_question_answers_options.dart @@ -91,7 +91,7 @@ class ProductQuestionAnswersOptions extends StatelessWidget { child: TextButton( onPressed: () => onAnswer(insightAnnotation), style: ButtonStyle( - backgroundColor: WidgetStateProperty.all(backgroundColor), + backgroundColor: MaterialStateProperty.all(backgroundColor), ), child: Text( buttonText, diff --git a/packages/smooth_app/lib/pages/scan/scan_header.dart b/packages/smooth_app/lib/pages/scan/scan_header.dart index 53cbe5bbb6e..ab419653504 100644 --- a/packages/smooth_app/lib/pages/scan/scan_header.dart +++ b/packages/smooth_app/lib/pages/scan/scan_header.dart @@ -24,7 +24,7 @@ class _ScanHeaderState extends State { final ContinuousScanModel model = context.watch(); final ButtonStyle buttonStyle = ButtonStyle( - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.circular(18.0)), ), diff --git a/packages/smooth_app/lib/pages/scan/scan_page.dart b/packages/smooth_app/lib/pages/scan/scan_page.dart index 26f22f14e30..f1a4f4401ea 100644 --- a/packages/smooth_app/lib/pages/scan/scan_page.dart +++ b/packages/smooth_app/lib/pages/scan/scan_page.dart @@ -64,7 +64,7 @@ class _ScanPageState extends State { color: Colors.white, child: SafeArea( child: Container( - color: Theme.of(context).colorScheme.surface, + color: Theme.of(context).colorScheme.background, child: Column( children: [ if (hasACamera) diff --git a/packages/smooth_app/lib/pages/scan/search_history_view.dart b/packages/smooth_app/lib/pages/scan/search_history_view.dart index a4b0a94507a..975da30935f 100644 --- a/packages/smooth_app/lib/pages/scan/search_history_view.dart +++ b/packages/smooth_app/lib/pages/scan/search_history_view.dart @@ -46,8 +46,8 @@ class _SearchHistoryViewState extends State { data: ListTileThemeData( titleTextStyle: const TextStyle(fontSize: 20.0), minLeadingWidth: 18.0, - iconColor: Theme.of(context).colorScheme.onSurface, - textColor: Theme.of(context).colorScheme.onSurface, + iconColor: Theme.of(context).colorScheme.onBackground, + textColor: Theme.of(context).colorScheme.onBackground, ), child: ListView.builder( itemBuilder: (BuildContext context, int i) { diff --git a/packages/smooth_app/lib/pages/user_management/forgot_password_page.dart b/packages/smooth_app/lib/pages/user_management/forgot_password_page.dart index 42108e73d1e..028ad5d5f38 100644 --- a/packages/smooth_app/lib/pages/user_management/forgot_password_page.dart +++ b/packages/smooth_app/lib/pages/user_management/forgot_password_page.dart @@ -150,10 +150,11 @@ class _ForgotPasswordPageState extends State } }, style: ButtonStyle( - minimumSize: WidgetStateProperty.all( + minimumSize: MaterialStateProperty.all( Size(size.width * 0.5, theme.buttonTheme.height + 10), ), - shape: WidgetStateProperty.all( + shape: + MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), diff --git a/packages/smooth_app/lib/pages/user_management/login_page.dart b/packages/smooth_app/lib/pages/user_management/login_page.dart index cbda47ad48b..fbd7e963e49 100644 --- a/packages/smooth_app/lib/pages/user_management/login_page.dart +++ b/packages/smooth_app/lib/pages/user_management/login_page.dart @@ -221,12 +221,12 @@ class _LoginPageState extends State with TraceableClientMixin { ElevatedButton( onPressed: () => _login(context), style: ButtonStyle( - minimumSize: WidgetStateProperty.all( + minimumSize: MaterialStateProperty.all( Size(size.width * 0.5, theme.buttonTheme.height + 10), ), - shape: - WidgetStateProperty.all( + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), @@ -249,14 +249,14 @@ class _LoginPageState extends State with TraceableClientMixin { //Forgot password TextButton( style: ButtonStyle( - padding: WidgetStateProperty.all( + padding: MaterialStateProperty.all( const EdgeInsets.symmetric( vertical: 10.0, horizontal: VERY_LARGE_SPACE, ), ), shape: - WidgetStateProperty.all( + MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), @@ -304,15 +304,15 @@ class _LoginPageState extends State with TraceableClientMixin { } }, style: ButtonStyle( - side: WidgetStateProperty.all( + side: MaterialStateProperty.all( BorderSide( color: theme.colorScheme.primary, width: 2.0), ), - minimumSize: WidgetStateProperty.all( + minimumSize: MaterialStateProperty.all( Size(size.width * 0.5, theme.buttonTheme.height), ), - shape: - WidgetStateProperty.all( + shape: MaterialStateProperty.all< + RoundedRectangleBorder>( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), diff --git a/packages/smooth_app/lib/pages/user_management/sign_up_page.dart b/packages/smooth_app/lib/pages/user_management/sign_up_page.dart index 8bbd6b10238..48f2713516f 100644 --- a/packages/smooth_app/lib/pages/user_management/sign_up_page.dart +++ b/packages/smooth_app/lib/pages/user_management/sign_up_page.dart @@ -56,11 +56,11 @@ class _SignUpPageState extends State with TraceableClientMixin { final AppLocalizations appLocalizations = AppLocalizations.of(context); final Size size = MediaQuery.sizeOf(context); - Color getCheckBoxColor(Set states) { - const Set interactiveStates = { - WidgetState.pressed, - WidgetState.hovered, - WidgetState.focused, + Color getCheckBoxColor(Set states) { + const Set interactiveStates = { + MaterialState.pressed, + MaterialState.hovered, + MaterialState.focused, }; if (states.any(interactiveStates.contains)) { return theme.colorScheme.onSurface; @@ -236,14 +236,14 @@ class _SignUpPageState extends State with TraceableClientMixin { child: Checkbox( value: _foodProducer, fillColor: - WidgetStateProperty.resolveWith(getCheckBoxColor), + MaterialStateProperty.resolveWith(getCheckBoxColor), onChanged: (_) {}, ), ), title: Text( appLocalizations.sign_up_page_producer_checkbox, style: theme.textTheme.bodyMedium - ?.copyWith(color: theme.colorScheme.onSurface), + ?.copyWith(color: theme.colorScheme.onBackground), ), ), if (_foodProducer) ...[ @@ -274,24 +274,24 @@ class _SignUpPageState extends State with TraceableClientMixin { child: Checkbox( value: _subscribe, fillColor: - WidgetStateProperty.resolveWith(getCheckBoxColor), + MaterialStateProperty.resolveWith(getCheckBoxColor), onChanged: (_) {}, ), ), title: Text( appLocalizations.sign_up_page_subscribe_checkbox, style: theme.textTheme.bodyMedium - ?.copyWith(color: theme.colorScheme.onSurface), + ?.copyWith(color: theme.colorScheme.onBackground), ), ), const SizedBox(height: space), ElevatedButton( onPressed: () async => _signUp(), style: ButtonStyle( - minimumSize: WidgetStateProperty.all( + minimumSize: MaterialStateProperty.all( Size(size.width * 0.5, theme.buttonTheme.height + 10), ), - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), @@ -447,7 +447,7 @@ class _TermsOfUseCheckbox extends StatelessWidget { final bool agree; final bool disagree; - final WidgetPropertyResolver checkboxColorResolver; + final MaterialPropertyResolver checkboxColorResolver; final ValueChanged onCheckboxChanged; @override @@ -470,7 +470,7 @@ class _TermsOfUseCheckbox extends StatelessWidget { ignoring: true, child: Checkbox( value: agree, - fillColor: WidgetStateProperty.resolveWith( + fillColor: MaterialStateProperty.resolveWith( checkboxColorResolver, ), onChanged: (_) {}, @@ -485,7 +485,7 @@ class _TermsOfUseCheckbox extends StatelessWidget { // additional space needed because of the next text span text: '${appLocalizations.sign_up_page_agree_text} ', style: theme.textTheme.bodyMedium?.copyWith( - color: theme.colorScheme.onSurface, + color: theme.colorScheme.onBackground, ), ), TextSpan( @@ -509,7 +509,7 @@ class _TermsOfUseCheckbox extends StatelessWidget { semanticLabel: appLocalizations.termsOfUse, Icons.info, color: checkboxColorResolver( - {WidgetState.selected}, + {MaterialState.selected}, ), ), ), diff --git a/packages/smooth_app/lib/smooth_category_picker_example.dart b/packages/smooth_app/lib/smooth_category_picker_example.dart index 86263096ff9..48287c35432 100644 --- a/packages/smooth_app/lib/smooth_category_picker_example.dart +++ b/packages/smooth_app/lib/smooth_category_picker_example.dart @@ -167,8 +167,9 @@ class _ExampleAppState extends State { foregroundColor: Colors.black, ), checkboxTheme: CheckboxTheme.of(context).copyWith( - fillColor: WidgetStateColor.resolveWith((Set states) { - if (states.contains(WidgetState.selected)) { + fillColor: + MaterialStateColor.resolveWith((Set states) { + if (states.contains(MaterialState.selected)) { return Colors.green; } return Colors.black38; diff --git a/packages/smooth_app/lib/themes/color_schemes.dart b/packages/smooth_app/lib/themes/color_schemes.dart index 59bd71c4963..9e31f3135f9 100644 --- a/packages/smooth_app/lib/themes/color_schemes.dart +++ b/packages/smooth_app/lib/themes/color_schemes.dart @@ -12,8 +12,10 @@ const ColorScheme lightColorScheme = ColorScheme( onSecondary: Color(0xFF000000), error: Color(0xFFEB5757), onError: Color(0xFFFFFFFF), - surface: Color(0xFFFFFFFF), - onSurface: Color(0xFF000000), + background: Color(0xFFFFFFFF), + onBackground: Color(0xFF000000), + surface: Color(0xFF85746C), + onSurface: Color(0xFFFFFFFF), ); const ColorScheme darkColorScheme = ColorScheme( @@ -25,8 +27,10 @@ const ColorScheme darkColorScheme = ColorScheme( onSecondary: Color(0xFFFFFFFF), error: Color(0xFFEB5757), onError: Color(0xFFFFFFFF), - surface: Color(0xFF201A17), - onSurface: Color(0xFFFFFFFF), + background: Color(0xFF201A17), + onBackground: Color(0xFFFFFFFF), + surface: Color(0xFFEDE0DB), + onSurface: Color(0xFF000000), ); const ColorScheme trueDarkColorScheme = ColorScheme( @@ -38,8 +42,10 @@ const ColorScheme trueDarkColorScheme = ColorScheme( onSecondary: Color(0xFFE1E1E1), error: Color(0xFFEA2B2B), onError: Color(0xFFE1E1E1), + background: Color(0xFF000000), + onBackground: Color(0xFFE1E1E1), surface: Color(0xFF000000), - onSurface: Color(0xFFFFFFFF), + onSurface: Color(0xFFE1E1E1), ); const String CONTRAST_LOW = 'Low'; diff --git a/packages/smooth_app/lib/themes/smooth_theme.dart b/packages/smooth_app/lib/themes/smooth_theme.dart index 1d41a28ecbe..301342c3123 100644 --- a/packages/smooth_app/lib/themes/smooth_theme.dart +++ b/packages/smooth_app/lib/themes/smooth_theme.dart @@ -47,7 +47,7 @@ class SmoothTheme { ], colorScheme: myColorScheme, canvasColor: themeProvider.currentTheme == THEME_AMOLED - ? myColorScheme.surface + ? myColorScheme.background : null, bottomNavigationBarTheme: BottomNavigationBarThemeData( selectedIconTheme: const IconThemeData(size: 24.0), @@ -61,10 +61,11 @@ class SmoothTheme { ), elevatedButtonTheme: ElevatedButtonThemeData( style: ButtonStyle( - backgroundColor: WidgetStateProperty.resolveWith( - (Set states) => states.contains(WidgetState.disabled) - ? Colors.grey - : myColorScheme.primary, + backgroundColor: MaterialStateProperty.resolveWith( + (Set states) => + states.contains(MaterialState.disabled) + ? Colors.grey + : myColorScheme.primary, ), ), ), @@ -75,8 +76,8 @@ class SmoothTheme { ? getTextTheme(themeProvider, textContrastProvider) : _TEXT_THEME, appBarTheme: AppBarTheme( - color: myColorScheme.surface, - foregroundColor: myColorScheme.onSurface, + color: myColorScheme.background, + foregroundColor: myColorScheme.onBackground, systemOverlayStyle: SystemUiOverlayStyle.light, ), dividerColor: const Color(0xFFdfdfdf), @@ -84,59 +85,59 @@ class SmoothTheme { fillColor: myColorScheme.secondary, ), iconTheme: IconThemeData( - color: myColorScheme.onSurface, + color: myColorScheme.onBackground, ), snackBarTheme: SnackBarThemeData( contentTextStyle: _TEXT_THEME.bodyMedium?.copyWith(color: myColorScheme.onPrimary), actionTextColor: myColorScheme.onPrimary, - backgroundColor: myColorScheme.onSurface, + backgroundColor: myColorScheme.onBackground, ), bannerTheme: MaterialBannerThemeData( contentTextStyle: TextStyle(color: myColorScheme.onSecondary), backgroundColor: myColorScheme.secondary, ), checkboxTheme: CheckboxThemeData( - fillColor: - WidgetStateProperty.resolveWith((Set states) { - if (states.contains(WidgetState.disabled)) { + fillColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { return null; } - if (states.contains(WidgetState.selected)) { + if (states.contains(MaterialState.selected)) { return myColorScheme.primary; } return null; }), ), radioTheme: RadioThemeData( - fillColor: - WidgetStateProperty.resolveWith((Set states) { - if (states.contains(WidgetState.disabled)) { + fillColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { return null; } - if (states.contains(WidgetState.selected)) { + if (states.contains(MaterialState.selected)) { return myColorScheme.primary; } return null; }), ), switchTheme: SwitchThemeData( - thumbColor: - WidgetStateProperty.resolveWith((Set states) { - if (states.contains(WidgetState.disabled)) { + thumbColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { return null; } - if (states.contains(WidgetState.selected)) { + if (states.contains(MaterialState.selected)) { return myColorScheme.primary; } return null; }), - trackColor: - WidgetStateProperty.resolveWith((Set states) { - if (states.contains(WidgetState.disabled)) { + trackColor: MaterialStateProperty.resolveWith( + (Set states) { + if (states.contains(MaterialState.disabled)) { return null; } - if (states.contains(WidgetState.selected)) { + if (states.contains(MaterialState.selected)) { return myColorScheme.primary; } return null; diff --git a/packages/smooth_app/lib/widgets/ranking_floating_action_button.dart b/packages/smooth_app/lib/widgets/ranking_floating_action_button.dart index 7a2de39e52a..c079a64c370 100644 --- a/packages/smooth_app/lib/widgets/ranking_floating_action_button.dart +++ b/packages/smooth_app/lib/widgets/ranking_floating_action_button.dart @@ -29,7 +29,7 @@ class RankingFloatingActionButton extends StatelessWidget { child: ElevatedButton.icon( onPressed: onPressed, style: ButtonStyle( - shape: WidgetStateProperty.all( + shape: MaterialStateProperty.all( const RoundedRectangleBorder( borderRadius: CIRCULAR_BORDER_RADIUS, ), diff --git a/packages/smooth_app/pubspec.lock b/packages/smooth_app/pubspec.lock index 88fb418e666..eaec5236455 100644 --- a/packages/smooth_app/pubspec.lock +++ b/packages/smooth_app/pubspec.lock @@ -903,10 +903,10 @@ packages: dependency: transitive description: name: in_app_review - sha256: "99869244d09adc76af16bf8fd731dd13cef58ecafd5917847589c49f378cbb30" + sha256: "6cb7a8e4a2eecfa5868b35e1e9ac9082341eeead2cefaac8282be514736e9715" url: "https://pub.dev" source: hosted - version: "2.0.9" + version: "2.0.4" in_app_review_platform_interface: dependency: transitive description: @@ -924,10 +924,10 @@ packages: dependency: "direct main" description: name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d" url: "https://pub.dev" source: hosted - version: "0.19.0" + version: "0.18.1" iso_countries: dependency: "direct main" description: @@ -964,26 +964,26 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.0" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "2.0.1" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 url: "https://pub.dev" source: hosted - version: "3.0.1" + version: "2.0.1" lints: dependency: transitive description: @@ -1052,10 +1052,10 @@ packages: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.11.0" mgrs_dart: dependency: transitive description: @@ -1599,10 +1599,10 @@ packages: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.6.1" typed_data: dependency: transitive description: @@ -1743,10 +1743,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "13.0.0" watcher: dependency: transitive description: @@ -1852,5 +1852,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.3.3 <4.0.0" flutter: ">=3.19.0" diff --git a/packages/smooth_app/pubspec.yaml b/packages/smooth_app/pubspec.yaml index 113f6f7bf8d..c0f7b8ff438 100644 --- a/packages/smooth_app/pubspec.yaml +++ b/packages/smooth_app/pubspec.yaml @@ -4,7 +4,7 @@ version: 0.0.0+734 publish_to: "none" environment: - sdk: '>=3.4.0 <4.0.0' + sdk: '>=3.3.3 <4.0.0' dependencies: flutter: @@ -54,7 +54,7 @@ dependencies: auto_size_text: 3.0.0 crop_image: 1.0.13 shared_preferences: 2.2.3 - intl: 0.19.0 + intl: 0.18.1 collection: 1.18.0 path: 1.9.0 path_provider: 2.1.3