From cbe0777534b6d51817f4307b377a9101d21562a7 Mon Sep 17 00:00:00 2001 From: Cagatay Ulusoy Date: Mon, 18 Nov 2024 21:47:40 +0200 Subject: [PATCH 1/4] Bump min version to 3.16.0 --- .github/workflows/checks.yml | 6 +++--- .github/workflows/firebase-hosting-pull-request.yml | 2 +- coffee_maker/pubspec.yaml | 2 +- coffee_maker_navigator_2/pubspec.yaml | 2 +- demo_ui_components/pubspec.yaml | 2 +- example/pubspec.yaml | 2 +- playground/pubspec.yaml | 2 +- playground_navigator2/pubspec.yaml | 2 +- pubspec.yaml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f4dcba10..42146683 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2.16.0 with: - flutter-version: '3.13.0' # Uses the minimum supported version. + flutter-version: '3.16.0' # Uses the minimum supported version. channel: stable - name: Install DCM uses: CQLabs/setup-dcm@v1 @@ -54,7 +54,7 @@ jobs: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2.16.0 with: - flutter-version: '3.13.0' # Uses the minimum supported version. + flutter-version: '3.16.0' # Uses the minimum supported version. channel: stable # Get Flutter version - name: Get Flutter version @@ -84,7 +84,7 @@ jobs: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2.16.0 with: - flutter-version: '3.13.0' # Uses the minimum supported version. + flutter-version: '3.16.0' # Uses the minimum supported version. channel: stable # Get Flutter version - name: Get Flutter version diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index 9e5f6a83..9f684882 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -10,7 +10,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - uses: subosito/flutter-action@v2.16.0 with: - flutter-version: '3.13.0' # Uses the minimum supported version. + flutter-version: '3.16.0' # Uses the minimum supported version. channel: stable - run: flutter build web --release --web-renderer=canvaskit working-directory: ./coffee_maker diff --git a/coffee_maker/pubspec.yaml b/coffee_maker/pubspec.yaml index 6b193468..bf63d26d 100644 --- a/coffee_maker/pubspec.yaml +++ b/coffee_maker/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" environment: sdk: '>=2.19.2 <4.0.0' - flutter: '>=3.13.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/coffee_maker_navigator_2/pubspec.yaml b/coffee_maker_navigator_2/pubspec.yaml index d40dfac0..37c790e5 100644 --- a/coffee_maker_navigator_2/pubspec.yaml +++ b/coffee_maker_navigator_2/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" environment: sdk: '>=3.0.0 <4.0.0' - flutter: '>=3.13.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/demo_ui_components/pubspec.yaml b/demo_ui_components/pubspec.yaml index e5dea010..1d2bc273 100644 --- a/demo_ui_components/pubspec.yaml +++ b/demo_ui_components/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" environment: sdk: '>=2.19.2 <4.0.0' - flutter: '>=3.13.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 6147450e..2027a951 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -5,7 +5,7 @@ version: 0.1.0 environment: sdk: '>=2.19.2 <4.0.0' - flutter: '>=3.13.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/playground/pubspec.yaml b/playground/pubspec.yaml index 8c6dbf4c..21b97775 100644 --- a/playground/pubspec.yaml +++ b/playground/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" environment: sdk: '>=2.19.2 <4.0.0' - flutter: '>=3.13.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/playground_navigator2/pubspec.yaml b/playground_navigator2/pubspec.yaml index 7a89cef1..eaece200 100644 --- a/playground_navigator2/pubspec.yaml +++ b/playground_navigator2/pubspec.yaml @@ -4,7 +4,7 @@ publish_to: "none" environment: sdk: '>=2.19.2 <4.0.0' - flutter: '>=3.13.0' + flutter: '>=3.16.0' dependencies: flutter: diff --git a/pubspec.yaml b/pubspec.yaml index 98ef4e58..78ac5121 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,7 +32,7 @@ screenshots: environment: sdk: '>=3.0.6 <4.0.0' - flutter: '>=3.13.0' + flutter: ">=3.16.0" dependencies: flutter: From 33396a5af0658c9725055569c9f6ef4d290090d4 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Mon, 18 Nov 2024 22:26:42 +0200 Subject: [PATCH 2/4] Fix some `avoid-suspicious-super-overrides` issues --- .../lib/router/playground_router_delegate.dart | 2 ++ playground_navigator2/lib/router/router_pages/home_page.dart | 5 +---- .../lib/router/router_pages/sheet_page.dart | 5 +---- .../lib/router/router_pages/unknown_page.dart | 5 +---- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/playground_navigator2/lib/router/playground_router_delegate.dart b/playground_navigator2/lib/router/playground_router_delegate.dart index 0975d61d..dfcf512d 100644 --- a/playground_navigator2/lib/router/playground_router_delegate.dart +++ b/playground_navigator2/lib/router/playground_router_delegate.dart @@ -108,6 +108,8 @@ class PlaygroundRouterDelegate @override void dispose() { _cubitSubscription.cancel(); + _pageIndexNotifier.dispose(); + _pageListBuilderNotifier.dispose(); super.dispose(); } } diff --git a/playground_navigator2/lib/router/router_pages/home_page.dart b/playground_navigator2/lib/router/router_pages/home_page.dart index 4eba68cd..ebf70b74 100644 --- a/playground_navigator2/lib/router/router_pages/home_page.dart +++ b/playground_navigator2/lib/router/router_pages/home_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:playground_navigator2/home/home_screen.dart'; class HomePage extends Page { - const HomePage() : super(key: const ValueKey('HomePage')); + const HomePage() : super(key: const ValueKey('HomePage'), name: 'Home Screen'); @override Route createRoute(BuildContext context) { @@ -11,7 +11,4 @@ class HomePage extends Page { builder: (context) => const HomeScreen(), ); } - - @override - String get name => 'Home Screen'; } diff --git a/playground_navigator2/lib/router/router_pages/sheet_page.dart b/playground_navigator2/lib/router/router_pages/sheet_page.dart index 6ffe843f..6a3c850d 100644 --- a/playground_navigator2/lib/router/router_pages/sheet_page.dart +++ b/playground_navigator2/lib/router/router_pages/sheet_page.dart @@ -7,7 +7,7 @@ class SheetPage extends Page { const SheetPage({ required this.pageIndexNotifier, required this.pageListBuilderNotifier, - }) : super(key: const ValueKey('SheetPage')); + }) : super(key: const ValueKey('SheetPage'), name: SheetPage.routeName); final ValueNotifier pageIndexNotifier; final ValueNotifier pageListBuilderNotifier; @@ -28,7 +28,4 @@ class SheetPage extends Page { settings: this, ); } - - @override - String get name => routeName; } diff --git a/playground_navigator2/lib/router/router_pages/unknown_page.dart b/playground_navigator2/lib/router/router_pages/unknown_page.dart index 44197384..15b35da6 100644 --- a/playground_navigator2/lib/router/router_pages/unknown_page.dart +++ b/playground_navigator2/lib/router/router_pages/unknown_page.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:playground_navigator2/unknown/unknown_screen.dart'; class UnknownPage extends Page { - const UnknownPage() : super(key: const ValueKey('UnknownPage')); + const UnknownPage() : super(key: const ValueKey('UnknownPage'), name: 'Unknown Screen'); @override Route createRoute(BuildContext context) { @@ -11,7 +11,4 @@ class UnknownPage extends Page { builder: (context) => const UnknownScreen(), ); } - - @override - String get name => 'Unknown Screen'; } From 3dfa187732dc46945068ed7621eb330597f9817f Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Tue, 19 Nov 2024 10:36:11 +0200 Subject: [PATCH 3/4] Fixes --- analysis_options.yaml | 2 ++ melos.yaml | 12 ++++++------ .../lib/router/router_pages/home_page.dart | 3 ++- .../lib/router/router_pages/unknown_page.dart | 3 ++- pubspec.yaml | 2 +- test/wolt_modal_sheet_test.dart | 14 +++++++------- 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index c20e7dce..d79647bc 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -24,6 +24,8 @@ dart_code_metrics: - avoid-dynamic: false - avoid-duplicate-test-assertions: false - prefer-correct-test-file-name: false + - avoid-suspicious-super-overrides: false + - avoid-collection-equality-checks: false analyzer: errors: diff --git a/melos.yaml b/melos.yaml index d32ace04..cd04a62b 100644 --- a/melos.yaml +++ b/melos.yaml @@ -3,12 +3,12 @@ repository: https://github.com/woltapp/wolt_modal_sheet packages: - . ## This is the root package - - coffee_maker - - coffee_maker_navigator_2 - - demo_ui_components - - playground - - playground_navigator2 - - wolt_di + # - coffee_maker + # - coffee_maker_navigator_2 + # - demo_ui_components + # - playground + # - playground_navigator2 + # - wolt_di command: bootstrap: diff --git a/playground_navigator2/lib/router/router_pages/home_page.dart b/playground_navigator2/lib/router/router_pages/home_page.dart index ebf70b74..1514f990 100644 --- a/playground_navigator2/lib/router/router_pages/home_page.dart +++ b/playground_navigator2/lib/router/router_pages/home_page.dart @@ -2,7 +2,8 @@ import 'package:flutter/material.dart'; import 'package:playground_navigator2/home/home_screen.dart'; class HomePage extends Page { - const HomePage() : super(key: const ValueKey('HomePage'), name: 'Home Screen'); + const HomePage() + : super(key: const ValueKey('HomePage'), name: 'Home Screen'); @override Route createRoute(BuildContext context) { diff --git a/playground_navigator2/lib/router/router_pages/unknown_page.dart b/playground_navigator2/lib/router/router_pages/unknown_page.dart index 15b35da6..29a6755c 100644 --- a/playground_navigator2/lib/router/router_pages/unknown_page.dart +++ b/playground_navigator2/lib/router/router_pages/unknown_page.dart @@ -2,7 +2,8 @@ import 'package:flutter/material.dart'; import 'package:playground_navigator2/unknown/unknown_screen.dart'; class UnknownPage extends Page { - const UnknownPage() : super(key: const ValueKey('UnknownPage'), name: 'Unknown Screen'); + const UnknownPage() + : super(key: const ValueKey('UnknownPage'), name: 'Unknown Screen'); @override Route createRoute(BuildContext context) { diff --git a/pubspec.yaml b/pubspec.yaml index 78ac5121..887cc591 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ topics: - custom-modal screenshots: - description: 'WoltModalSheet page elements' - path: doc/bottom_sheet_elements.jpeg + path: doc/bottom_sheet_elements.jpg - description: 'WoltModalSheet page layers' path: doc/modal_sheet_page.png - description: 'Experience multi-page navigation in WoltModalSheet.' diff --git a/test/wolt_modal_sheet_test.dart b/test/wolt_modal_sheet_test.dart index 68f820f0..0380e0e6 100644 --- a/test/wolt_modal_sheet_test.dart +++ b/test/wolt_modal_sheet_test.dart @@ -131,7 +131,7 @@ void main() { 'WoltModalSheet.modalTypeBuilder defaults - wide window size', (tester) async { Size viewSize = const Size(800.0, 600.0); - Size sheetPageSize = const Size(524.0, 86.0); + Size sheetPageSize = const Size(524.0, 92.0); await tester.pumpWidget(buildSheetWithShow()); @@ -144,11 +144,11 @@ void main() { expect(tester.getSize(sheetMaterial), sheetPageSize); expect( tester.getTopLeft(sheetMaterial), - Offset((viewSize.width / 2) - (sheetPageSize.width / 2), 257.0), + Offset((viewSize.width / 2) - (sheetPageSize.width / 2), 254.0), ); expect( tester.getTopRight(sheetMaterial), - Offset((viewSize.width / 2) + (sheetPageSize.width / 2), 257.0), + Offset((viewSize.width / 2) + (sheetPageSize.width / 2), 254.0), ); }, ); @@ -190,7 +190,7 @@ void main() { expect( tester.getSize(sheetPageMaterialFinder(tester)), - const Size(800.0, 86.0), + const Size(800.0, 92.0), ); // Tap to dismiss the sheet. @@ -210,7 +210,7 @@ void main() { expect( tester.getSize(sheetPageMaterialFinder(tester)), - const Size(524.0, 86.0), + const Size(524.0, 92.0), ); // Tap to dismiss the sheet. @@ -230,7 +230,7 @@ void main() { expect( tester.getSize(sheetPageMaterialFinder(tester)), - const Size(404.0, 86.0), + const Size(404.0, 92.0), ); // Tap to dismiss the sheet. @@ -293,7 +293,7 @@ void main() { ); expect( tester.getSize(find.byType(ColoredBox).last), - equals(const Size(524.0, 86.0)), + equals(const Size(524.0, 92.0)), ); }); From cdb0dbe3a8fd66f4caa3005f6197c3fc16a3ae30 Mon Sep 17 00:00:00 2001 From: Taha Tesser Date: Tue, 19 Nov 2024 13:21:55 +0200 Subject: [PATCH 4/4] Fix issues --- melos.yaml | 14 ++++++-------- pubspec.yaml | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/melos.yaml b/melos.yaml index cd04a62b..756d4797 100644 --- a/melos.yaml +++ b/melos.yaml @@ -3,12 +3,12 @@ repository: https://github.com/woltapp/wolt_modal_sheet packages: - . ## This is the root package - # - coffee_maker - # - coffee_maker_navigator_2 - # - demo_ui_components - # - playground - # - playground_navigator2 - # - wolt_di + - coffee_maker + - coffee_maker_navigator_2 + - demo_ui_components + - playground + - playground_navigator2 + - wolt_di command: bootstrap: @@ -24,5 +24,3 @@ scripts: exec: dcm analyze . format: exec: dart format --set-exit-if-changed . - test: - exec: flutter test diff --git a/pubspec.yaml b/pubspec.yaml index 887cc591..78ac5121 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -10,7 +10,7 @@ topics: - custom-modal screenshots: - description: 'WoltModalSheet page elements' - path: doc/bottom_sheet_elements.jpg + path: doc/bottom_sheet_elements.jpeg - description: 'WoltModalSheet page layers' path: doc/modal_sheet_page.png - description: 'Experience multi-page navigation in WoltModalSheet.'