Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Revert Flutter bump to 3.22 #5463

Merged
merged 1 commit into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion flutter-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.22.2
3.19.5
2 changes: 1 addition & 1 deletion packages/app_store/apple_app_store/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/app_store/google_play/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/app_store/shared/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/app_store/uri_store/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/scanner/ml_kit/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/scanner/shared/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion packages/scanner/zxing/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@ class SmoothSimpleButton extends StatelessWidget {
style: ButtonStyle(
backgroundColor: buttonColor == null
? null
: WidgetStateProperty.all<Color>(buttonColor!),
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
: MaterialStateProperty.all<Color>(buttonColor!),
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
RoundedRectangleBorder(borderRadius: borderRadius),
),
overlayColor: context.read<ThemeProvider>().isAmoledTheme
? WidgetStateProperty.resolveWith((Set<WidgetState> states) {
return states.contains(WidgetState.pressed)
? MaterialStateProperty.resolveWith((Set<MaterialState> states) {
return states.contains(MaterialState.pressed)
? Theme.of(context).colorScheme.primary.withOpacity(0.3)
: null;
})
: null,
side: context.read<ThemeProvider>().isAmoledTheme
? WidgetStateProperty.all<BorderSide>(
? MaterialStateProperty.all<BorderSide>(
const BorderSide(color: Colors.white),
)
: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down
6 changes: 3 additions & 3 deletions packages/smooth_app/lib/pages/image_crop_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ class _ImageSourceButton extends StatelessWidget {
child: OutlinedButton(
onPressed: onPressed,
style: ButtonStyle(
side: WidgetStatePropertyAll<BorderSide>(
side: MaterialStatePropertyAll<BorderSide>(
BorderSide(color: primaryColor),
),
padding: const WidgetStatePropertyAll<EdgeInsetsGeometry>(
padding: const MaterialStatePropertyAll<EdgeInsetsGeometry>(
EdgeInsets.symmetric(vertical: LARGE_SPACE),
),
shape: WidgetStatePropertyAll<OutlinedBorder>(
shape: MaterialStatePropertyAll<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: ROUNDED_BORDER_RADIUS,
side: BorderSide(color: primaryColor),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class _LocationQueryPageState extends State<LocationQueryPage>
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) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Color>(Theme.of(context).splashColor)
? MaterialStateProperty.all<Color>(
Theme.of(context).splashColor)
: null,
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(40))),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,31 +62,31 @@ class OnboardingBottomHills extends StatelessWidget {
end: 15.0,
child: TextButton(
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>(
backgroundColor: MaterialStateProperty.all<Color>(
Colors.white,
),
padding: WidgetStateProperty.all<EdgeInsetsGeometry>(
padding: MaterialStateProperty.all<EdgeInsetsGeometry>(
const EdgeInsetsDirectional.only(
start: LARGE_SPACE + 1.0,
end: LARGE_SPACE,
top: SMALL_SPACE,
bottom: SMALL_SPACE,
),
),
elevation: WidgetStateProperty.all<double>(4.0),
iconColor: WidgetStateProperty.all<Color>(
elevation: MaterialStateProperty.all<double>(4.0),
iconColor: MaterialStateProperty.all<Color>(
colors.orange,
),
foregroundColor: WidgetStateProperty.all<Color>(
foregroundColor: MaterialStateProperty.all<Color>(
colors.orange,
),
iconSize: WidgetStateProperty.all<double>(21.0),
shape: WidgetStateProperty.all<OutlinedBorder>(
iconSize: MaterialStateProperty.all<double>(21.0),
shape: MaterialStateProperty.all<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20.0),
),
),
shadowColor: WidgetStateProperty.all<Color>(
shadowColor: MaterialStateProperty.all<Color>(
Colors.black.withOpacity(0.50),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ class UserPreferencesAccount extends AbstractUserPreferences {
child: ElevatedButton(
onPressed: () async => _goToLoginPage(),
style: ButtonStyle(
minimumSize: WidgetStateProperty.all<Size>(
minimumSize: MaterialStateProperty.all<Size>(
Size(size.width * 0.5, themeData.buttonTheme.height + 10),
),
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
const RoundedRectangleBorder(
borderRadius: CIRCULAR_BORDER_RADIUS,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ class _ProductListPageState extends State<ProductListPage>
appLocalizations.product_list_empty_message,
textAlign: TextAlign.center,
style: themeData.textTheme.bodyMedium?.apply(
color: themeData.colorScheme.onSurface,
color: themeData.colorScheme.onBackground,
),
),
EMPTY_WIDGET,
Expand Down
8 changes: 4 additions & 4 deletions packages/smooth_app/lib/pages/product/edit_image_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class _EditOcrPageState extends State<EditOcrPage> 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,
Expand Down
4 changes: 2 additions & 2 deletions packages/smooth_app/lib/pages/product/new_product_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@ class _ProductPageState extends State<ProductPage>
),
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,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class NutritionAddNutrientButton extends StatelessWidget {
}
},
style: ButtonStyle(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
const RoundedRectangleBorder(
borderRadius: ROUNDED_BORDER_RADIUS,
side: BorderSide.none,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class _NutritionPageLoadedState extends State<NutritionPageLoaded>
value: _nutritionContainer.noNutritionData,
onChanged: (final bool value) =>
setState(() => _nutritionContainer.noNutritionData = value),
trackColor: WidgetStateProperty.all(
trackColor: MaterialStateProperty.all(
Theme.of(context).colorScheme.onPrimary),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ class ProductIncompleteCard extends StatelessWidget {
),
),
style: ButtonStyle(
backgroundColor: WidgetStateProperty.all<Color>(
backgroundColor: MaterialStateProperty.all<Color>(
colorScheme.primary,
),
foregroundColor: WidgetStateProperty.all<Color>(
foregroundColor: MaterialStateProperty.all<Color>(
colorScheme.onPrimary,
),
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
const RoundedRectangleBorder(borderRadius: ANGULAR_BORDER_RADIUS),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/pages/scan/scan_header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class _ScanHeaderState extends State<ScanHeader> {
final ContinuousScanModel model = context.watch<ContinuousScanModel>();

final ButtonStyle buttonStyle = ButtonStyle(
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
shape: MaterialStateProperty.all<RoundedRectangleBorder>(
const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(18.0)),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/pages/scan/scan_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class _ScanPageState extends State<ScanPage> {
color: Colors.white,
child: SafeArea(
child: Container(
color: Theme.of(context).colorScheme.surface,
color: Theme.of(context).colorScheme.background,
child: Column(
children: <Widget>[
if (hasACamera)
Expand Down
4 changes: 2 additions & 2 deletions packages/smooth_app/lib/pages/scan/search_history_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class _SearchHistoryViewState extends State<SearchHistoryView> {
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) {
Expand Down
Loading
Loading