diff --git a/.github/workflows/on-commit-main.yml b/.github/workflows/on-commit-main.yml index 8a1a061..fab830a 100644 --- a/.github/workflows/on-commit-main.yml +++ b/.github/workflows/on-commit-main.yml @@ -124,7 +124,7 @@ jobs: - name: Checkout project uses: actions/checkout@v7 - name: Setup Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: 'zulu' java-version: '17' diff --git a/.github/workflows/on-pull-request.yml b/.github/workflows/on-pull-request.yml index 238b91a..03b0add 100644 --- a/.github/workflows/on-pull-request.yml +++ b/.github/workflows/on-pull-request.yml @@ -134,7 +134,7 @@ jobs: - name: Checkout project uses: actions/checkout@v7 - name: Setup Java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: 'zulu' java-version: '17' diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml index 7d464ed..d8a5a44 100644 --- a/example/analysis_options.yaml +++ b/example/analysis_options.yaml @@ -1,3 +1,12 @@ +analyzer: + exclude: + - build/** + - android/** + - ios/** + - web/** + - windows/** + - macos/** + - linux/** include: ../analysis_options.yaml linter: diff --git a/example/lib/flutter_map_mbtiles/page.dart b/example/lib/flutter_map_mbtiles/page.dart index 05c0059..f120e31 100644 --- a/example/lib/flutter_map_mbtiles/page.dart +++ b/example/lib/flutter_map_mbtiles/page.dart @@ -2,7 +2,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_mbtiles/flutter_map_mbtiles.dart'; import 'package:flutter_map_plugins_example/common/utils.dart'; -import 'package:latlong2/latlong.dart'; import 'package:mbtiles/mbtiles.dart'; class FlutterMapMbTilesPage extends StatefulWidget { @@ -24,7 +23,7 @@ class _FlutterMapMbTilesPageState extends State { final file = await copyAssetToFile( 'assets/mbtiles/countries-raster.mbtiles', ); - return MbTiles(mbtilesPath: file.path); + return MbTiles(path: file.path); } @override @@ -82,7 +81,7 @@ class _FlutterMapMbTilesPageState extends State { @override void dispose() { // close the open database connection - _mbtiles?.dispose(); + _mbtiles?.close(); super.dispose(); } } diff --git a/example/lib/vector_map_tiles_mbtiles/page.dart b/example/lib/vector_map_tiles_mbtiles/page.dart index 2258229..dad688d 100644 --- a/example/lib/vector_map_tiles_mbtiles/page.dart +++ b/example/lib/vector_map_tiles_mbtiles/page.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_plugins_example/common/utils.dart'; -import 'package:latlong2/latlong.dart'; import 'package:mbtiles/mbtiles.dart'; import 'package:vector_map_tiles/vector_map_tiles.dart'; import 'package:vector_map_tiles_mbtiles/vector_map_tiles_mbtiles.dart'; @@ -29,7 +28,7 @@ class _VectorMapTilesMbTilesPageState extends State { final file = await copyAssetToFile( 'assets/mbtiles/malta-vector.mbtiles', ); - return MbTiles(mbtilesPath: file.path, gzip: false); + return MbTiles(path: file.path, gzip: false); } @override @@ -95,7 +94,7 @@ class _VectorMapTilesMbTilesPageState extends State { @override void dispose() { // close the open database connection - _mbtiles?.dispose(); + _mbtiles?.close(); super.dispose(); } } diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index b205693..37da8d9 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -6,11 +6,13 @@ import FlutterMacOS import Foundation import connectivity_plus +import maplibre import sqlite3_flutter_libs import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin")) + MaplibrePlugin.register(with: registry.registrar(forPlugin: "MaplibrePlugin")) Sqlite3FlutterLibsPlugin.register(with: registry.registrar(forPlugin: "Sqlite3FlutterLibsPlugin")) UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin")) } diff --git a/example/pubspec.yaml b/example/pubspec.yaml index 7ce2f6d..069995c 100644 --- a/example/pubspec.yaml +++ b/example/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: flutter_map: ^8.0.0 flutter_web_plugins: sdk: flutter - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" url_launcher: ^6.2.4 connectivity_plus: ^7.0.0 path_provider: ^2.0.15 @@ -22,10 +22,9 @@ dependencies: http_cache_drift_store: ^7.0.0 http_cache_file_store: ^2.0.0 http_cache_hive_store: ^5.0.0 - sqlite3_flutter_libs: ^0.5.15 - vector_map_tiles: ^9.0.0-beta.8 - vector_tile_renderer: ^6.0.0 - mbtiles: ^0.4.0 + vector_map_tiles: ^10.0.0-beta.2 + vector_tile_renderer: ^7.0.0-beta.1 + mbtiles: ^0.5.0 maplibre: ^0.3.0 flutter_map_cache: diff --git a/flutter_map_cache/README.md b/flutter_map_cache/README.md index b4f377b..fbca49f 100644 --- a/flutter_map_cache/README.md +++ b/flutter_map_cache/README.md @@ -67,7 +67,6 @@ dependencies: # drift http_cache_drift_store: ^7.0.0 - sqlite3_flutter_libs: ^0.5.15 # file system http_cache_file_store: ^2.0.0 diff --git a/flutter_map_cache/analysis_options.yaml b/flutter_map_cache/analysis_options.yaml index 0caccc8..4634922 100644 --- a/flutter_map_cache/analysis_options.yaml +++ b/flutter_map_cache/analysis_options.yaml @@ -1 +1,4 @@ +analyzer: + exclude: + - build/** include: ../analysis_options.yaml \ No newline at end of file diff --git a/flutter_map_cache/lib/src/cached_image_provider.dart b/flutter_map_cache/lib/src/cached_image_provider.dart index f537324..2323a36 100644 --- a/flutter_map_cache/lib/src/cached_image_provider.dart +++ b/flutter_map_cache/lib/src/cached_image_provider.dart @@ -94,7 +94,7 @@ class CachedImageProvider extends ImageProvider { final bytes = Uint8List.fromList(response.data!); final codec = decode(await ImmutableBuffer.fromUint8List(bytes)); cancelLoading.ignore(); - return codec; + return await codec; } catch (error) { // check if request is cancelled if (error is DioException) { diff --git a/flutter_map_cache/pubspec.yaml b/flutter_map_cache/pubspec.yaml index 491e7d4..ebce78b 100644 --- a/flutter_map_cache/pubspec.yaml +++ b/flutter_map_cache/pubspec.yaml @@ -31,6 +31,6 @@ dev_dependencies: flutter_test: sdk: flutter http_mock_adapter: ^0.6.1 - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" test: ^1.24.9 very_good_analysis: ^10.0.0 \ No newline at end of file diff --git a/flutter_map_compass/analysis_options.yaml b/flutter_map_compass/analysis_options.yaml index 0caccc8..4634922 100644 --- a/flutter_map_compass/analysis_options.yaml +++ b/flutter_map_compass/analysis_options.yaml @@ -1 +1,4 @@ +analyzer: + exclude: + - build/** include: ../analysis_options.yaml \ No newline at end of file diff --git a/flutter_map_compass/pubspec.yaml b/flutter_map_compass/pubspec.yaml index 299ec85..d73dec3 100644 --- a/flutter_map_compass/pubspec.yaml +++ b/flutter_map_compass/pubspec.yaml @@ -22,6 +22,6 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" test: ^1.24.9 very_good_analysis: ^10.0.0 diff --git a/flutter_map_maplibre/analysis_options.yaml b/flutter_map_maplibre/analysis_options.yaml index 7e9053c..82c7614 100644 --- a/flutter_map_maplibre/analysis_options.yaml +++ b/flutter_map_maplibre/analysis_options.yaml @@ -1,3 +1,6 @@ +analyzer: + exclude: + - build/** include: ../analysis_options.yaml linter: diff --git a/flutter_map_maplibre/pubspec.yaml b/flutter_map_maplibre/pubspec.yaml index 5dcbaad..2c6be54 100644 --- a/flutter_map_maplibre/pubspec.yaml +++ b/flutter_map_maplibre/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: flutter: sdk: flutter flutter_map: ^8.0.0 - latlong2: ^0.9.1 + latlong2: ">=0.9.0 <0.11.0" maplibre: ^0.3.0 dev_dependencies: diff --git a/flutter_map_mbtiles/analysis_options.yaml b/flutter_map_mbtiles/analysis_options.yaml index 0caccc8..4634922 100644 --- a/flutter_map_mbtiles/analysis_options.yaml +++ b/flutter_map_mbtiles/analysis_options.yaml @@ -1 +1,4 @@ +analyzer: + exclude: + - build/** include: ../analysis_options.yaml \ No newline at end of file diff --git a/flutter_map_mbtiles/lib/src/mbtiles_tile_provider.dart b/flutter_map_mbtiles/lib/src/mbtiles_tile_provider.dart index bf85b89..860b5c6 100644 --- a/flutter_map_mbtiles/lib/src/mbtiles_tile_provider.dart +++ b/flutter_map_mbtiles/lib/src/mbtiles_tile_provider.dart @@ -18,7 +18,7 @@ class MbTilesTileProvider extends TileProvider { MbTilesTileProvider.fromPath({ required String path, this.silenceTileNotFound = !kDebugMode, - }) : mbtiles = MbTiles(mbtilesPath: path), + }) : mbtiles = MbTiles(path: path), _createdInternally = true; /// MBTiles database @@ -44,7 +44,7 @@ class MbTilesTileProvider extends TileProvider { @override void dispose() { - if (_createdInternally) mbtiles.dispose(); + if (_createdInternally) mbtiles.close(); super.dispose(); } } diff --git a/flutter_map_mbtiles/pubspec.yaml b/flutter_map_mbtiles/pubspec.yaml index da1e88a..c37c112 100644 --- a/flutter_map_mbtiles/pubspec.yaml +++ b/flutter_map_mbtiles/pubspec.yaml @@ -17,14 +17,13 @@ dependencies: flutter: sdk: flutter flutter_map: ">=6.0.0 <9.0.0" - mbtiles: ^0.4.0 - sqlite3_flutter_libs: ^0.5.18 + mbtiles: ^0.5.0 dev_dependencies: build_runner: ^2.4.8 flutter_test: sdk: flutter - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" mockito: ^5.4.4 test: ^1.24.9 very_good_analysis: ^10.0.0 diff --git a/flutter_map_mbtiles/test/integration_test.mocks.dart b/flutter_map_mbtiles/test/integration_test.mocks.dart index d1b1353..37b5b2c 100644 --- a/flutter_map_mbtiles/test/integration_test.mocks.dart +++ b/flutter_map_mbtiles/test/integration_test.mocks.dart @@ -1,12 +1,13 @@ -// Mocks generated by Mockito 5.4.5 from annotations +// Mocks generated by Mockito from annotations // in flutter_map_mbtiles/test/integration_test.dart. // Do not manually edit this file. // ignore_for_file: no_leading_underscores_for_library_prefixes + import 'dart:typed_data' as _i4; import 'package:mbtiles/src/mbtiles.dart' as _i3; -import 'package:mbtiles/src/model/mbtiles_metadata.dart' as _i2; +import 'package:mbtiles/src/model/metadata.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: type=lint @@ -15,6 +16,7 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: comment_references // ignore_for_file: deprecated_member_use // ignore_for_file: deprecated_member_use_from_same_package +// ignore_for_file: experimental_member_use // ignore_for_file: implementation_imports // ignore_for_file: invalid_use_of_visible_for_testing_member // ignore_for_file: must_be_immutable @@ -22,11 +24,17 @@ import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: unnecessary_parenthesis // ignore_for_file: camel_case_types // ignore_for_file: subtype_of_sealed_class +// ignore_for_file: invalid_use_of_internal_member class _FakeMbTilesMetadata_0 extends _i1.SmartFake implements _i2.MbTilesMetadata { - _FakeMbTilesMetadata_0(Object parent, Invocation parentInvocation) - : super(parent, parentInvocation); + _FakeMbTilesMetadata_0( + Object parent, + Invocation parentInvocation, + ) : super( + parent, + parentInvocation, + ); } /// A class which mocks [MbTiles]. @@ -43,27 +51,54 @@ class MockMbTiles extends _i1.Mock implements _i3.MbTiles { @override _i2.MbTilesMetadata getMetadata({bool? allowCache = true}) => (super.noSuchMethod( - Invocation.method(#getMetadata, [], {#allowCache: allowCache}), + Invocation.method( + #getMetadata, + [], + {#allowCache: allowCache}, + ), returnValue: _FakeMbTilesMetadata_0( this, - Invocation.method(#getMetadata, [], {#allowCache: allowCache}), + Invocation.method( + #getMetadata, + [], + {#allowCache: allowCache}, + ), ), returnValueForMissingStub: _FakeMbTilesMetadata_0( this, - Invocation.method(#getMetadata, [], {#allowCache: allowCache}), + Invocation.method( + #getMetadata, + [], + {#allowCache: allowCache}, + ), ), ) as _i2.MbTilesMetadata); @override - _i4.Uint8List? getTile({required int? z, required int? x, required int? y}) => + _i4.Uint8List? getTile({ + required int? z, + required int? x, + required int? y, + }) => (super.noSuchMethod( - Invocation.method(#getTile, [], {#z: z, #x: x, #y: y}), + Invocation.method( + #getTile, + [], + { + #z: z, + #x: x, + #y: y, + }, + ), returnValueForMissingStub: null, ) as _i4.Uint8List?); @override void createTables() => super.noSuchMethod( - Invocation.method(#createTables, []), + Invocation.method( + #createTables, + [], + ), returnValueForMissingStub: null, ); @@ -75,19 +110,34 @@ class MockMbTiles extends _i1.Mock implements _i3.MbTiles { required _i4.Uint8List? bytes, }) => super.noSuchMethod( - Invocation.method(#putTile, [], {#z: z, #x: x, #y: y, #bytes: bytes}), + Invocation.method( + #putTile, + [], + { + #z: z, + #x: x, + #y: y, + #bytes: bytes, + }, + ), returnValueForMissingStub: null, ); @override void setMetadata(_i2.MbTilesMetadata? metadata) => super.noSuchMethod( - Invocation.method(#setMetadata, [metadata]), + Invocation.method( + #setMetadata, + [metadata], + ), returnValueForMissingStub: null, ); @override - void dispose() => super.noSuchMethod( - Invocation.method(#dispose, []), + void close() => super.noSuchMethod( + Invocation.method( + #close, + [], + ), returnValueForMissingStub: null, ); } diff --git a/flutter_map_mbtiles/test/utils/test_app.dart b/flutter_map_mbtiles/test/utils/test_app.dart index 708bb47..fcefce4 100644 --- a/flutter_map_mbtiles/test/utils/test_app.dart +++ b/flutter_map_mbtiles/test/utils/test_app.dart @@ -1,7 +1,6 @@ import 'package:flutter/material.dart'; import 'package:flutter_map/flutter_map.dart'; import 'package:flutter_map_mbtiles/src/mbtiles_tile_provider.dart'; -import 'package:latlong2/latlong.dart'; import 'package:mbtiles/mbtiles.dart'; class TestApp extends StatelessWidget { diff --git a/flutter_map_pmtiles/analysis_options.yaml b/flutter_map_pmtiles/analysis_options.yaml index 0caccc8..4634922 100644 --- a/flutter_map_pmtiles/analysis_options.yaml +++ b/flutter_map_pmtiles/analysis_options.yaml @@ -1 +1,4 @@ +analyzer: + exclude: + - build/** include: ../analysis_options.yaml \ No newline at end of file diff --git a/flutter_map_pmtiles/pubspec.yaml b/flutter_map_pmtiles/pubspec.yaml index 726e852..1a3ef91 100644 --- a/flutter_map_pmtiles/pubspec.yaml +++ b/flutter_map_pmtiles/pubspec.yaml @@ -17,7 +17,7 @@ dependencies: flutter: sdk: flutter flutter_map: ">=6.0.0 <9.0.0" - pmtiles: ^1.2.0 + pmtiles: ^2.0.0 dev_dependencies: flutter_test: @@ -25,5 +25,5 @@ dev_dependencies: test: ^1.24.9 mockito: ^5.4.4 build_runner: ^2.4.8 - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" very_good_analysis: ^10.0.0 diff --git a/pubspec.yaml b/pubspec.yaml index 151d6aa..5e8ca01 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -13,7 +13,22 @@ workspace: - vector_map_tiles_pmtiles dev_dependencies: - melos: ^7.0.0 + melos: ^8.0.0 + +dependency_overrides: + vector_map_tiles: + git: + url: https://github.com/greensopinion/flutter-vector-map-tiles + ref: 9.0.0 + vector_tile_renderer: + git: + url: https://github.com/greensopinion/dart-vector-tile-renderer + ref: main + protobuf: + git: + url: https://github.com/google/protobuf.dart + ref: master + path: protobuf melos: scripts: diff --git a/vector_map_tiles_mbtiles/README.md b/vector_map_tiles_mbtiles/README.md index 73aaa3e..7c5d982 100644 --- a/vector_map_tiles_mbtiles/README.md +++ b/vector_map_tiles_mbtiles/README.md @@ -26,7 +26,7 @@ Add the following packages to your `pubspec.yaml` file: dependencies: flutter_map: ^6.0.0 # in case you don't have it yet vector_map_tiles_mbtiles: ^1.0.0 # this package - mbtiles: ^0.4.0 # MBTiles package + mbtiles: ^0.5.0 # MBTiles package ``` ## Usage diff --git a/vector_map_tiles_mbtiles/analysis_options.yaml b/vector_map_tiles_mbtiles/analysis_options.yaml index 0caccc8..4634922 100644 --- a/vector_map_tiles_mbtiles/analysis_options.yaml +++ b/vector_map_tiles_mbtiles/analysis_options.yaml @@ -1 +1,4 @@ +analyzer: + exclude: + - build/** include: ../analysis_options.yaml \ No newline at end of file diff --git a/vector_map_tiles_mbtiles/pubspec.yaml b/vector_map_tiles_mbtiles/pubspec.yaml index 7d7d980..712aee6 100644 --- a/vector_map_tiles_mbtiles/pubspec.yaml +++ b/vector_map_tiles_mbtiles/pubspec.yaml @@ -16,8 +16,8 @@ environment: dependencies: flutter: sdk: flutter - mbtiles: ^0.4.0 - vector_map_tiles: ^9.0.0-beta.8 + mbtiles: ^0.5.0 + vector_map_tiles: ^10.0.0-beta.2 dev_dependencies: flutter_test: @@ -25,7 +25,7 @@ dev_dependencies: test: ^1.24.9 mocktail: ^1.0.5 build_runner: ^2.4.8 - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" flutter_map: ^8.0.0 very_good_analysis: ^10.0.0 - vector_tile_renderer: ^6.0.0 + vector_tile_renderer: ^7.0.0-beta.1 diff --git a/vector_map_tiles_mbtiles/test/pmtiles_tile_provider_test.dart b/vector_map_tiles_mbtiles/test/pmtiles_tile_provider_test.dart index 0385244..cd9dd78 100644 --- a/vector_map_tiles_mbtiles/test/pmtiles_tile_provider_test.dart +++ b/vector_map_tiles_mbtiles/test/pmtiles_tile_provider_test.dart @@ -1,7 +1,6 @@ import 'dart:typed_data'; import 'package:flutter_test/flutter_test.dart'; -import 'package:latlong2/latlong.dart'; import 'package:mbtiles/mbtiles.dart'; import 'package:mocktail/mocktail.dart'; import 'package:vector_map_tiles/vector_map_tiles.dart'; diff --git a/vector_map_tiles_pmtiles/analysis_options.yaml b/vector_map_tiles_pmtiles/analysis_options.yaml index 736df9e..e6f2b93 100644 --- a/vector_map_tiles_pmtiles/analysis_options.yaml +++ b/vector_map_tiles_pmtiles/analysis_options.yaml @@ -1,5 +1,7 @@ include: ../analysis_options.yaml analyzer: + exclude: + - build/** language: strict-inference: false \ No newline at end of file diff --git a/vector_map_tiles_pmtiles/pubspec.yaml b/vector_map_tiles_pmtiles/pubspec.yaml index 0be9591..b10eeb8 100644 --- a/vector_map_tiles_pmtiles/pubspec.yaml +++ b/vector_map_tiles_pmtiles/pubspec.yaml @@ -16,16 +16,16 @@ environment: dependencies: flutter: sdk: flutter - pmtiles: ^1.2.0 - vector_map_tiles: ^9.0.0-beta.8 - vector_tile_renderer: ^6.0.0 + pmtiles: ^2.0.0 + vector_map_tiles: ^10.0.0-beta.2 + vector_tile_renderer: ^7.0.0-beta.1 dev_dependencies: build_runner: ^2.4.8 flutter_map: ^8.0.0 flutter_test: sdk: flutter - latlong2: ^0.9.0 + latlong2: ">=0.9.0 <0.11.0" mocktail: ^1.0.5 test: ^1.24.9 very_good_analysis: ^10.0.0 \ No newline at end of file