Skip to content

Commit

Permalink
chore(deps): upgrade example to flutter 3.22.2
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasleyba committed Jun 18, 2024
1 parent 8699444 commit d27cc87
Show file tree
Hide file tree
Showing 36 changed files with 107 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ads_consent_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/ads_consent_client
coverage_excludes: "lib/src/generated/*.dart"
2 changes: 1 addition & 1 deletion .github/workflows/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/api
analyze_directories: "routes lib test"
coverage_excludes: "**/*.g.dart"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/app_ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/app_ui
coverage_excludes: "lib/src/generated/*.dart"
2 changes: 1 addition & 1 deletion .github/workflows/article_repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/article_repository
2 changes: 1 addition & 1 deletion .github/workflows/authentication_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/authentication_client/authentication_client
2 changes: 1 addition & 1 deletion .github/workflows/deep_link_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/deep_link_client
2 changes: 1 addition & 1 deletion .github/workflows/email_launcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/email_launcher
coverage_excludes: "lib/src/generated/*.dart"
2 changes: 1 addition & 1 deletion .github/workflows/firebase_authentication_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/authentication_client/firebase_authentication_client
2 changes: 1 addition & 1 deletion .github/workflows/firebase_notifications_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/notifications_client/firebase_notifications_client
2 changes: 1 addition & 1 deletion .github/workflows/flutter_news_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: subosito/[email protected]
with:
channel: ${{matrix.channel}}
flutter-version: "3.19.6"
flutter-version: "3.22.2"
cache: false

- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/form_inputs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/form_inputs
2 changes: 1 addition & 1 deletion .github/workflows/in_app_purchase_repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/in_app_purchase_repository
2 changes: 1 addition & 1 deletion .github/workflows/news_blocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
coverage_excludes: "**/*.g.dart"
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/api/packages/news_blocks
2 changes: 1 addition & 1 deletion .github/workflows/news_blocks_ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/news_blocks_ui
coverage_excludes: "lib/src/generated/*.dart"
# Due to incompability with custom goldenFileComparator,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/news_repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/news_repository
2 changes: 1 addition & 1 deletion .github/workflows/notifications_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/notifications_client/notifications_client
2 changes: 1 addition & 1 deletion .github/workflows/notifications_repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/notifications_repository
2 changes: 1 addition & 1 deletion .github/workflows/one_signal_notifications_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/notifications_client/one_signal_notifications_client
2 changes: 1 addition & 1 deletion .github/workflows/package_info_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/package_info_client
2 changes: 1 addition & 1 deletion .github/workflows/permission_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/permission_client
2 changes: 1 addition & 1 deletion .github/workflows/persistent_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
coverage_excludes: "**/*.g.dart"
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/storage/persistent_storage
2 changes: 1 addition & 1 deletion .github/workflows/purchase_client.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/purchase_client
2 changes: 1 addition & 1 deletion .github/workflows/secure_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ jobs:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
coverage_excludes: "**/*.g.dart"
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/storage/secure_storage
2 changes: 1 addition & 1 deletion .github/workflows/share_launcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/share_launcher
2 changes: 1 addition & 1 deletion .github/workflows/storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/storage/storage
2 changes: 1 addition & 1 deletion .github/workflows/token_storage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1
with:
dart_sdk: 3.3.4
dart_sdk: 3.4.0
working_directory: flutter_news_example/packages/authentication_client/token_storage
2 changes: 1 addition & 1 deletion .github/workflows/user_repository.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ jobs:
build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
with:
flutter_version: 3.19.6
flutter_version: 3.22.2
working_directory: flutter_news_example/packages/user_repository
4 changes: 2 additions & 2 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ workflows:
working_directory: flutter_news_example
max_build_duration: 60
environment:
flutter: 3.19.6
flutter: 3.22.2
xcode: latest
cocoapods: default
vars:
Expand Down Expand Up @@ -144,7 +144,7 @@ workflows:
working_directory: flutter_news_example
max_build_duration: 60
environment:
flutter: 3.19.6
flutter: 3.22.2
xcode: latest
cocoapods: default
vars:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ class CategoriesTabBar extends StatelessWidget implements PreferredSizeWidget {
@override
Widget build(BuildContext context) {
return TabBar(
tabAlignment: TabAlignment.start,
controller: controller,
isScrollable: true,
tabs: tabs,
Expand Down
23 changes: 14 additions & 9 deletions flutter_news_example/packages/app_ui/lib/src/theme/app_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class AppTheme {
ColorScheme get _colorScheme {
return ColorScheme.light(
secondary: AppColors.secondary,
background: _backgroundColor,
surface: _backgroundColor,
);
}

Expand Down Expand Up @@ -210,19 +210,24 @@ class AppTheme {

SwitchThemeData get _switchTheme {
return SwitchThemeData(
thumbColor:
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
thumbColor: WidgetStateProperty.resolveWith((Set<WidgetState> states) {
if (states.contains(WidgetState.selected)) {
return AppColors.darkAqua;
}
return AppColors.eerieBlack;
}),
trackColor:
MaterialStateProperty.resolveWith((Set<MaterialState> states) {
if (states.contains(MaterialState.selected)) {
trackColor: WidgetStateProperty.resolveWith((Set<WidgetState> states) {
if (states.contains(WidgetState.selected)) {
return AppColors.primaryContainer;
}
return AppColors.paleSky;
return AppColors.grey;
}),
trackOutlineColor:
WidgetStateProperty.resolveWith((Set<WidgetState> states) {
if (states.contains(WidgetState.selected)) {
return AppColors.primaryContainer;
}
return AppColors.grey;
}),
);
}
Expand Down Expand Up @@ -288,7 +293,7 @@ class AppDarkTheme extends AppTheme {
return const ColorScheme.dark().copyWith(
primary: AppColors.white,
secondary: AppColors.secondary,
background: AppColors.grey.shade900,
surface: AppColors.grey.shade900,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,19 +388,19 @@ class AppButton extends StatelessWidget {
return ElevatedButton(
onPressed: onPressed,
style: ButtonStyle(
maximumSize: MaterialStateProperty.all(_maximumSize),
padding: MaterialStateProperty.all(_padding),
minimumSize: MaterialStateProperty.all(_minimumSize),
textStyle: MaterialStateProperty.all(textStyle),
maximumSize: WidgetStateProperty.all(_maximumSize),
padding: WidgetStateProperty.all(_padding),
minimumSize: WidgetStateProperty.all(_minimumSize),
textStyle: WidgetStateProperty.all(textStyle),
backgroundColor: onPressed == null
? MaterialStateProperty.all(_disabledButtonColor)
: MaterialStateProperty.all(_buttonColor),
elevation: MaterialStateProperty.all(_elevation),
? WidgetStateProperty.all(_disabledButtonColor)
: WidgetStateProperty.all(_buttonColor),
elevation: WidgetStateProperty.all(_elevation),
foregroundColor: onPressed == null
? MaterialStateProperty.all(_disabledForegroundColor)
: MaterialStateProperty.all(_foregroundColor),
side: MaterialStateProperty.all(_borderSide),
shape: MaterialStateProperty.all(
? WidgetStateProperty.all(_disabledForegroundColor)
: WidgetStateProperty.all(_foregroundColor),
side: WidgetStateProperty.all(_borderSide),
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ class AppSwitch extends StatelessWidget {
),
),
Padding(
padding: const EdgeInsets.only(
top: AppSpacing.xxs,
),
padding: const EdgeInsets.only(left: AppSpacing.xs),
child: Switch(
value: value,
onChanged: onChanged,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void main() {
.themeData
.switchTheme
.thumbColor
?.resolve({MaterialState.selected}),
?.resolve({WidgetState.selected}),
equals(AppColors.darkAqua),
);
});
Expand All @@ -69,15 +69,39 @@ void main() {
.themeData
.switchTheme
.trackColor
?.resolve({MaterialState.selected}),
?.resolve({WidgetState.selected}),
equals(AppColors.primaryContainer),
);
});

test('returns paleSky when not selected', () {
test('returns grey when not selected', () {
expect(
const AppTheme().themeData.switchTheme.trackColor?.resolve({}),
equals(AppColors.paleSky),
equals(AppColors.grey),
);
});
});

group('trackOutlineColor', () {
test('returns primaryContainer when selected', () {
expect(
const AppTheme()
.themeData
.switchTheme
.trackOutlineColor
?.resolve({WidgetState.selected}),
equals(AppColors.primaryContainer),
);
});

test('returns grey when not selected', () {
expect(
const AppTheme()
.themeData
.switchTheme
.trackOutlineColor
?.resolve({}),
equals(AppColors.grey),
);
});
});
Expand Down Expand Up @@ -123,7 +147,7 @@ void main() {

test('background is grey.shade900', () {
expect(
const AppDarkTheme().themeData.colorScheme.background,
const AppDarkTheme().themeData.colorScheme.surface,
AppColors.grey.shade900,
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void main() {
final currentPage = tester
.widget<PageView>(find.byKey(slideshowPageViewKey))
.controller
.page;
?.page;

// Check current page
expect(currentPage, 2);
Expand Down Expand Up @@ -237,7 +237,7 @@ void main() {
final currentPage = tester
.widget<PageView>(find.byKey(slideshowPageViewKey))
.controller
.page;
?.page;

// Check current page
expect(currentPage, 1);
Expand Down
Loading

0 comments on commit d27cc87

Please sign in to comment.