From 5a7906d7f6be008a2e22406f4029aa2f2e6e4589 Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Wed, 25 Dec 2024 00:03:00 +0100 Subject: [PATCH 1/4] fix deprecations --- example/lib/flutter_map_maplibre/page.dart | 2 +- example/lib/flutter_map_maplibre/page2.dart | 2 +- example/lib/main.dart | 6 +++--- example/pubspec.yaml | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/example/lib/flutter_map_maplibre/page.dart b/example/lib/flutter_map_maplibre/page.dart index e5cce31..c012fdf 100644 --- a/example/lib/flutter_map_maplibre/page.dart +++ b/example/lib/flutter_map_maplibre/page.dart @@ -86,7 +86,7 @@ class _MapLibreFlutterMapPageState extends State { LatLng(5, -10), LatLng(10, -15), ], - color: Colors.pink.withOpacity(0.8), + color: Colors.pink.withValues(alpha: 0.8), ), ], ), diff --git a/example/lib/flutter_map_maplibre/page2.dart b/example/lib/flutter_map_maplibre/page2.dart index 4ad237c..dd981c6 100644 --- a/example/lib/flutter_map_maplibre/page2.dart +++ b/example/lib/flutter_map_maplibre/page2.dart @@ -86,7 +86,7 @@ class _FlutterMapMapLibrePageState extends State { LatLng(5, -10), LatLng(10, -15), ], - color: Colors.pink.withOpacity(0.8), + color: Colors.pink.withValues(alpha: 0.8), ), ], ), diff --git a/example/lib/main.dart b/example/lib/main.dart index ff25cf8..70d1b61 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -10,11 +10,11 @@ import 'package:flutter_map_plugins_example/flutter_map_mbtiles/page.dart'; import 'package:flutter_map_plugins_example/flutter_map_pmtiles/page.dart'; import 'package:flutter_map_plugins_example/vector_map_tiles_mbtiles/page.dart'; import 'package:flutter_map_plugins_example/vector_map_tiles_pmtiles/page.dart'; +import 'package:flutter_web_plugins/url_strategy.dart'; import 'package:url_launcher/url_launcher_string.dart'; -import 'package:url_strategy/url_strategy.dart'; void main() { - setPathUrlStrategy(); + usePathUrlStrategy(); runApp(const MyApp()); } @@ -108,7 +108,7 @@ class SelectionPage extends StatelessWidget { actions: [githubButton], ), body: ColoredBox( - color: Colors.blueGrey.withOpacity(0.3), + color: Colors.blueGrey.withValues(alpha: 0.3), child: Padding( padding: const EdgeInsets.all(8), child: GridView.count( diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 53280db..aef35e7 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -10,9 +10,10 @@ dependencies: flutter: sdk: flutter flutter_map: ^7.0.0 + flutter_web_plugins: + sdk: flutter latlong2: ^0.9.0 url_launcher: ^6.2.4 - url_strategy: ^0.3.0 connectivity_plus: ^6.0.0 path_provider: ^2.0.15 dio: ^5.2.0+1 From cc7cd06c435154dd2abea1b061cb9a9f177d0924 Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Wed, 25 Dec 2024 00:36:01 +0100 Subject: [PATCH 2/4] Update page.dart --- example/lib/vector_map_tiles_pmtiles/page.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/lib/vector_map_tiles_pmtiles/page.dart b/example/lib/vector_map_tiles_pmtiles/page.dart index 70bc500..d53cbe7 100644 --- a/example/lib/vector_map_tiles_pmtiles/page.dart +++ b/example/lib/vector_map_tiles_pmtiles/page.dart @@ -20,7 +20,7 @@ class VectorMapTilesPmTilesPage extends StatelessWidget { /// /// Note: Styles from Mapbox, OpenMapTiles and others and not compatible /// with Protomaps styles. - final vtr.Theme mapTheme = ProtomapsThemes.lightV4( + final vtr.Theme mapTheme = ProtomapsThemes.lightV3( logger: kDebugMode ? const vtr.Logger.console() : null, ); From bd77176a3d1c005897bc494f0cc4ee2c390d80ea Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Wed, 25 Dec 2024 00:37:24 +0100 Subject: [PATCH 3/4] very_good_analysis: ^7.0.0 --- example/pubspec.yaml | 2 +- flutter_map_cache/pubspec.yaml | 2 +- flutter_map_compass/pubspec.yaml | 2 +- flutter_map_maplibre/pubspec.yaml | 2 +- flutter_map_mbtiles/pubspec.yaml | 2 +- flutter_map_pmtiles/pubspec.yaml | 2 +- pubspec.yaml | 2 +- vector_map_tiles_mbtiles/pubspec.yaml | 2 +- vector_map_tiles_pmtiles/pubspec.yaml | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/example/pubspec.yaml b/example/pubspec.yaml index aef35e7..e3139a0 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -43,7 +43,7 @@ dependencies: path: ../vector_map_tiles_pmtiles dev_dependencies: - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 flutter: uses-material-design: true diff --git a/flutter_map_cache/pubspec.yaml b/flutter_map_cache/pubspec.yaml index 5610ea3..0bed8f7 100644 --- a/flutter_map_cache/pubspec.yaml +++ b/flutter_map_cache/pubspec.yaml @@ -30,4 +30,4 @@ dev_dependencies: http_mock_adapter: ^0.6.1 latlong2: ^0.9.0 test: ^1.24.9 - very_good_analysis: ^6.0.0 \ No newline at end of file + very_good_analysis: ^7.0.0 \ No newline at end of file diff --git a/flutter_map_compass/pubspec.yaml b/flutter_map_compass/pubspec.yaml index ea83765..1810b3a 100644 --- a/flutter_map_compass/pubspec.yaml +++ b/flutter_map_compass/pubspec.yaml @@ -20,4 +20,4 @@ dev_dependencies: sdk: flutter latlong2: ^0.9.0 test: ^1.24.9 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/flutter_map_maplibre/pubspec.yaml b/flutter_map_maplibre/pubspec.yaml index af5aba0..62212ae 100644 --- a/flutter_map_maplibre/pubspec.yaml +++ b/flutter_map_maplibre/pubspec.yaml @@ -19,4 +19,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/flutter_map_mbtiles/pubspec.yaml b/flutter_map_mbtiles/pubspec.yaml index a4fe1e4..839d296 100644 --- a/flutter_map_mbtiles/pubspec.yaml +++ b/flutter_map_mbtiles/pubspec.yaml @@ -23,4 +23,4 @@ dev_dependencies: latlong2: ^0.9.0 mockito: ^5.4.4 test: ^1.24.9 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/flutter_map_pmtiles/pubspec.yaml b/flutter_map_pmtiles/pubspec.yaml index be76cd1..08f9134 100644 --- a/flutter_map_pmtiles/pubspec.yaml +++ b/flutter_map_pmtiles/pubspec.yaml @@ -22,4 +22,4 @@ dev_dependencies: mockito: ^5.4.4 build_runner: ^2.4.8 latlong2: ^0.9.0 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/pubspec.yaml b/pubspec.yaml index 7da8438..270fc31 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,4 +5,4 @@ environment: dev_dependencies: melos: ^6.0.0 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 diff --git a/vector_map_tiles_mbtiles/pubspec.yaml b/vector_map_tiles_mbtiles/pubspec.yaml index 1bea674..e739f89 100644 --- a/vector_map_tiles_mbtiles/pubspec.yaml +++ b/vector_map_tiles_mbtiles/pubspec.yaml @@ -23,5 +23,5 @@ dev_dependencies: build_runner: ^2.4.8 latlong2: ^0.9.0 flutter_map: ^7.0.0 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 vector_tile_renderer: ^5.2.0 diff --git a/vector_map_tiles_pmtiles/pubspec.yaml b/vector_map_tiles_pmtiles/pubspec.yaml index c6076e6..1faf036 100644 --- a/vector_map_tiles_pmtiles/pubspec.yaml +++ b/vector_map_tiles_pmtiles/pubspec.yaml @@ -24,4 +24,4 @@ dev_dependencies: latlong2: ^0.9.0 mockito: ^5.4.4 test: ^1.24.9 - very_good_analysis: ^6.0.0 + very_good_analysis: ^7.0.0 From 0b8f7359cb0761309308bae19db5035106e67bba Mon Sep 17 00:00:00 2001 From: Joscha <34318751+josxha@users.noreply.github.com> Date: Wed, 25 Dec 2024 00:43:28 +0100 Subject: [PATCH 4/4] fix some lints --- analysis_options.yaml | 3 ++- example/analysis_options.yaml | 3 ++- flutter_map_cache/test/cached_tile_provider_test.dart | 1 + flutter_map_compass/test/utils/test_app.dart | 2 -- vector_map_tiles_mbtiles/test/utils/test_app.dart | 4 +--- vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v3/grayscale.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v3/light.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v3/white.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v4/_package.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v4/black.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v4/dark.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v4/grayscale.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v4/light.dart | 1 + vector_map_tiles_pmtiles/lib/src/themes/v4/white.dart | 1 + 15 files changed, 16 insertions(+), 7 deletions(-) diff --git a/analysis_options.yaml b/analysis_options.yaml index b37da7d..5455ecc 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -4,4 +4,5 @@ linter: rules: flutter_style_todos: false cascade_invocations: false - sort_pub_dependencies: false \ No newline at end of file + sort_pub_dependencies: false + deprecated_member_use_from_same_package: false \ No newline at end of file diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 1fa06a2..7d464ed 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -2,4 +2,5 @@ include: ../analysis_options.yaml linter: rules: - public_member_api_docs: false \ No newline at end of file + public_member_api_docs: false + deprecated_member_use_from_same_package: true \ No newline at end of file diff --git a/flutter_map_cache/test/cached_tile_provider_test.dart b/flutter_map_cache/test/cached_tile_provider_test.dart index 4126bd1..7e24572 100644 --- a/flutter_map_cache/test/cached_tile_provider_test.dart +++ b/flutter_map_cache/test/cached_tile_provider_test.dart @@ -5,6 +5,7 @@ import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_cache/flutter_map_cache.dart'; import 'package:test/test.dart'; +// Keep the original format. // ignore_for_file: deprecated_member_use_from_same_package Future main() async { diff --git a/flutter_map_compass/test/utils/test_app.dart b/flutter_map_compass/test/utils/test_app.dart index 173df77..9d151a2 100644 --- a/flutter_map_compass/test/utils/test_app.dart +++ b/flutter_map_compass/test/utils/test_app.dart @@ -3,8 +3,6 @@ import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_compass/flutter_map_compass.dart'; import 'package:latlong2/latlong.dart'; -// ignore_for_file: diagnostic_describe_all_properties - class TestApp extends StatelessWidget { const TestApp({ required this.mapController, diff --git a/vector_map_tiles_mbtiles/test/utils/test_app.dart b/vector_map_tiles_mbtiles/test/utils/test_app.dart index 05068e4..3253333 100644 --- a/vector_map_tiles_mbtiles/test/utils/test_app.dart +++ b/vector_map_tiles_mbtiles/test/utils/test_app.dart @@ -6,9 +6,7 @@ import 'package:vector_map_tiles/vector_map_tiles.dart'; import 'package:vector_map_tiles_mbtiles/vector_map_tiles_mbtiles.dart'; import 'package:vector_tile_renderer/vector_tile_renderer.dart'; -// ignore_for_file: diagnostic_describe_all_properties - -class TestApp extends StatelessWidget { +yclass TestApp extends StatelessWidget { const TestApp({required this.mbTiles, super.key}); final MbTiles mbTiles; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart b/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart index 2eac662..1d9392a 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/protomaps_themes.dart @@ -2,6 +2,7 @@ import 'package:vector_map_tiles_pmtiles/src/themes/v3/_package.dart' as v3; import 'package:vector_map_tiles_pmtiles/src/themes/v4/_package.dart' as v4; import 'package:vector_tile_renderer/vector_tile_renderer.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// Protomaps themes. diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v3/grayscale.dart b/vector_map_tiles_pmtiles/lib/src/themes/v3/grayscale.dart index f6c20d2..129ee2e 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v3/grayscale.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v3/grayscale.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#grayscale diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v3/light.dart b/vector_map_tiles_pmtiles/lib/src/themes/v3/light.dart index 47dafd4..5243d02 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v3/light.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v3/light.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#light diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v3/white.dart b/vector_map_tiles_pmtiles/lib/src/themes/v3/white.dart index 0edcd6f..07cc35a 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v3/white.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v3/white.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#white diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v4/_package.dart b/vector_map_tiles_pmtiles/lib/src/themes/v4/_package.dart index e8a3ae4..e697c3c 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v4/_package.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v4/_package.dart @@ -1,3 +1,4 @@ +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas part 'black.dart'; diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v4/black.dart b/vector_map_tiles_pmtiles/lib/src/themes/v4/black.dart index 1ec4332..079be13 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v4/black.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v4/black.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#black diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v4/dark.dart b/vector_map_tiles_pmtiles/lib/src/themes/v4/dark.dart index bf4402d..8330aea 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v4/dark.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v4/dark.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#dark diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v4/grayscale.dart b/vector_map_tiles_pmtiles/lib/src/themes/v4/grayscale.dart index f79b0f6..badab34 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v4/grayscale.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v4/grayscale.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#grayscale diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v4/light.dart b/vector_map_tiles_pmtiles/lib/src/themes/v4/light.dart index 3a5af87..299f9c5 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v4/light.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v4/light.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#light diff --git a/vector_map_tiles_pmtiles/lib/src/themes/v4/white.dart b/vector_map_tiles_pmtiles/lib/src/themes/v4/white.dart index bd080dd..123ce4e 100644 --- a/vector_map_tiles_pmtiles/lib/src/themes/v4/white.dart +++ b/vector_map_tiles_pmtiles/lib/src/themes/v4/white.dart @@ -1,5 +1,6 @@ part of '_package.dart'; +// Keep the original format. // ignore_for_file: prefer_single_quotes, require_trailing_commas /// https://docs.protomaps.com/basemaps/themes#white