From eb6126571c8e16799962749b44e4ef1ea6d95f65 Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Mon, 11 Sep 2023 22:39:45 +0900 Subject: [PATCH 1/5] Update url_launcher_web to v2.0.16 --- flutter_custom_tabs_web/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter_custom_tabs_web/pubspec.yaml b/flutter_custom_tabs_web/pubspec.yaml index 0b5d882..15df99a 100644 --- a/flutter_custom_tabs_web/pubspec.yaml +++ b/flutter_custom_tabs_web/pubspec.yaml @@ -20,8 +20,8 @@ dependencies: flutter_custom_tabs_platform_interface: path: ../flutter_custom_tabs_platform_interface meta: ^1.9.1 - url_launcher_web: ^2.0.1 url_launcher_platform_interface: ^2.0.3 + url_launcher_web: ^2.0.16 dev_dependencies: flutter_test: From 90404fb467adf0ee155ec6b6759b1411f7d0f7bb Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Mon, 11 Sep 2023 22:39:57 +0900 Subject: [PATCH 2/5] Update url_launcher_platform_interface to v2.1.2 --- flutter_custom_tabs_web/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flutter_custom_tabs_web/pubspec.yaml b/flutter_custom_tabs_web/pubspec.yaml index 15df99a..2440a9a 100644 --- a/flutter_custom_tabs_web/pubspec.yaml +++ b/flutter_custom_tabs_web/pubspec.yaml @@ -20,8 +20,8 @@ dependencies: flutter_custom_tabs_platform_interface: path: ../flutter_custom_tabs_platform_interface meta: ^1.9.1 - url_launcher_platform_interface: ^2.0.3 url_launcher_web: ^2.0.16 + url_launcher_platform_interface: ^2.1.2 dev_dependencies: flutter_test: From 4dd60713188df392907abd547b4601f5fe496d93 Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Mon, 11 Sep 2023 22:40:35 +0900 Subject: [PATCH 3/5] Introduce flutter_lints to web example --- .../integration_test/flutter_custom_tabs_web_test.dart | 2 +- .../example/integration_test/mock_url_launcher_plugin.dart | 3 ++- flutter_custom_tabs_web/example/lib/main.dart | 6 ++++-- flutter_custom_tabs_web/example/pubspec.yaml | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/flutter_custom_tabs_web/example/integration_test/flutter_custom_tabs_web_test.dart b/flutter_custom_tabs_web/example/integration_test/flutter_custom_tabs_web_test.dart index e874351..014de73 100644 --- a/flutter_custom_tabs_web/example/integration_test/flutter_custom_tabs_web_test.dart +++ b/flutter_custom_tabs_web/example/integration_test/flutter_custom_tabs_web_test.dart @@ -31,7 +31,7 @@ void main() { webOnlyWindowName: anyNamed('webOnlyWindowName'), )).thenAnswer((_) async => true); - final url = 'https://example.com'; + const url = 'https://example.com'; await plugin.launch( url, customTabsOptions: const CustomTabsOptions(), diff --git a/flutter_custom_tabs_web/example/integration_test/mock_url_launcher_plugin.dart b/flutter_custom_tabs_web/example/integration_test/mock_url_launcher_plugin.dart index 57f93e9..3abe6c4 100644 --- a/flutter_custom_tabs_web/example/integration_test/mock_url_launcher_plugin.dart +++ b/flutter_custom_tabs_web/example/integration_test/mock_url_launcher_plugin.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:html'; import 'package:mockito/mockito.dart'; @@ -28,7 +29,7 @@ class MockUrlLauncherPlugin extends Mock bool? universalLinksOnly = false, Map? headers = const {}, String? webOnlyWindowName, - }) { + }) async { return super.noSuchMethod( Invocation.method(#launch, [ url diff --git a/flutter_custom_tabs_web/example/lib/main.dart b/flutter_custom_tabs_web/example/lib/main.dart index 3de372b..77aa8f9 100644 --- a/flutter_custom_tabs_web/example/lib/main.dart +++ b/flutter_custom_tabs_web/example/lib/main.dart @@ -1,11 +1,13 @@ import 'package:flutter/material.dart'; -void main() => runApp(TestApp()); +void main() => runApp(const TestApp()); class TestApp extends StatelessWidget { + const TestApp({super.key}); + @override Widget build(BuildContext context) { - return Directionality( + return const Directionality( textDirection: TextDirection.ltr, child: Text('Now testing...'), ); diff --git a/flutter_custom_tabs_web/example/pubspec.yaml b/flutter_custom_tabs_web/example/pubspec.yaml index a845496..5ba45d6 100644 --- a/flutter_custom_tabs_web/example/pubspec.yaml +++ b/flutter_custom_tabs_web/example/pubspec.yaml @@ -20,3 +20,4 @@ dev_dependencies: sdk: flutter mockito: ^5.0.9 plugin_platform_interface: ^2.0.0 + flutter_lints: ^2.0.1 From 3a0ccf40b50514d6cd9bbd01b4eccb69a43b7d7a Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Mon, 11 Sep 2023 22:43:39 +0900 Subject: [PATCH 4/5] Update the dependencies of the web example --- flutter_custom_tabs_web/example/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flutter_custom_tabs_web/example/pubspec.yaml b/flutter_custom_tabs_web/example/pubspec.yaml index 5ba45d6..cc84ed4 100644 --- a/flutter_custom_tabs_web/example/pubspec.yaml +++ b/flutter_custom_tabs_web/example/pubspec.yaml @@ -18,6 +18,6 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter - mockito: ^5.0.9 - plugin_platform_interface: ^2.0.0 + mockito: ^5.4.2 + plugin_platform_interface: ^2.1.5 flutter_lints: ^2.0.1 From 44ef05dffc30590098e485d594eb7a7aaf71b47c Mon Sep 17 00:00:00 2001 From: Shinya Kumagai Date: Mon, 11 Sep 2023 22:52:30 +0900 Subject: [PATCH 5/5] Add missing analysis_options.yaml to web example --- .../example/analysis_options.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 flutter_custom_tabs_web/example/analysis_options.yaml diff --git a/flutter_custom_tabs_web/example/analysis_options.yaml b/flutter_custom_tabs_web/example/analysis_options.yaml new file mode 100644 index 0000000..42758d2 --- /dev/null +++ b/flutter_custom_tabs_web/example/analysis_options.yaml @@ -0,0 +1,12 @@ +include: package:flutter_lints/flutter.yaml + +analyzer: + exclude: + # Ignore generated files + - '**/*.g.dart' + - '**/*.mocks.dart' # Mockito @GenerateMocks + +linter: + rules: + depend_on_referenced_packages: false + avoid_web_libraries_in_flutter: false \ No newline at end of file