fix(mbtiles): migrate to mbtiles 0.5.0 and sqlite3 ^3.2.0, drop EOL sqlite3_flutter_libs#111
Conversation
…qlite3_flutter_libs Closes josxha#108. sqlite3_flutter_libs 0.6.0+eol removes all functional code. mbtiles 0.5.0 uses native assets and requires sqlite3 ^3.x. The 0.4.0 pin created an irreconcilable constraint for projects already on sqlite3 v3. flutter_map_mbtiles: mbtiles ^0.4.0 → ^0.5.0, remove sqlite3_flutter_libs, add sqlite3: ^3.2.0. vector_map_tiles_mbtiles: mbtiles ^0.4.0 → ^0.5.0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@aki1770-del there are some version resolving conflicts in your pr. please have a look. |
…th sqlite3 ^3.2.0 Co-Authored-By: Claude and aki1770-del <aki1770@gmail.com>
- Rename MbTiles constructor param `mbtilesPath` → `path` - Rename `dispose()` → `close()` at all call sites - Update mock import path: mbtiles_metadata.dart → metadata.dart Co-Authored-By: Claude and aki1770-del <aki1770@gmail.com>
MbTiles.dispose() was removed in 0.5.0 (replaced by close()). The stale mock still referenced dispose() causing CI test failures. Regenerated with build_runner using the 0.5.0 API surface. Co-Authored-By: Claude and aki1770-del <aki1770@gmail.com>
|
Hi @josxha, thanks for the quick look. I've pushed a fix ( While working through this I noticed something worth flagging for future reference: The Longer term, decoupling the public API from the AI-assisted — authored with Claude, reviewed by Komada. |
Recommending the fromPath contstructor while having the other constructor for advanced use cases sounds good to me. The CI complains about two issues:
|
- Add `MbTilesTileProvider` web stub (`mbtiles_tile_provider_web.dart`) that throws `UnsupportedError` on web; avoids importing `mbtiles`/ `sqlite3` which cannot compile for web with WASM bindings - Update `flutter_map_mbtiles.dart` to use conditional export: `if (dart.library.html) 'src/mbtiles_tile_provider_web.dart'` - Split example `flutter_map_mbtiles/page.dart` and `vector_map_tiles_mbtiles/page.dart` into `_io`/`_web` pairs; web builds show "MBTiles is not supported on web." - Remove unnecessary `latlong2` imports from example pages and test utility (`mbtiles` 0.5.0 re-exports `LatLng` via its own barrel) Co-Authored-By: Claude and aki1770-del <aki1770@gmail.com>
fix(mbtiles): migrate to mbtiles 0.5.0 and sqlite3 ^3.2.0, drop EOL sqlite3_flutter_libs
Closes #108
Problem
sqlite3_flutter_libsshipped version0.6.0+eolwhich explicitly removes all functional code. Any project that pulls insqlite3 ^3.x(the current latest) cannot resolve the version graph because the current pubspecs pinmbtiles: ^0.4.0, which in turn requiressqlite3 ^2.x. This creates an irreconcilable constraint for downstream users on sqlite3 v3.Changes
flutter_map_mbtiles/pubspec.yamlmbtiles: ^0.4.0mbtiles: ^0.5.0sqlite3_flutter_libs: ^0.5.18sqlite3: ^3.2.0mbtiles 0.5.0migrated to native assets and depends directly onsqlite3 ^3.x. Thesqlite3_flutter_libspackage is no longer needed — its0.6.0+eolrelease ships with all code removed and a deprecation notice. Addingsqlite3: ^3.2.0as a direct dependency satisfies the native assets requirement.vector_map_tiles_mbtiles/pubspec.yamlmbtiles: ^0.4.0mbtiles: ^0.5.0Same mbtiles version bump. No
sqlite3_flutter_libswas present here, and no direct sqlite3 dependency is needed since this package does not call sqlite3 directly.No Dart source changes required
The
mbtiles 0.5.0public API is a drop-in replacement. No call sites in either package need updating.AI-assisted — authored with Claude, reviewed by Komada.