Skip to content

v6.0.0

Latest

Choose a tag to compare

@mattermoran mattermoran released this 27 Jul 22:23
2d95abb

Add your own map apps, ship only the maps you use, and launch them in one line.

Maps are now MapApp objects instead of enum values. Subclass MapApp to
add any map app without forking the plugin. Only the maps you reference are
compiled into your app
, so URL schemes, package names, and icons of unused
maps never touch your binary. And discovery results are directly launchable:
maps.first.show().

See MIGRATION.md for the full 5.x → 6.0 guide.

New Features:

  • Custom maps: subclass MapApp to add any map app (regional, proprietary,
    internal) without forking the plugin. Works everywhere a built-in map does,
    including discovery and launching.
  • Tree-shakeable maps: referencing MapApp.waze compiles in only Waze's
    code, strings, and icon. Unreferenced maps are stripped completely from
    release binaries, verified by scanning AOT snapshots.
  • Launchable discovery results: final maps = await request.getSupportedMaps([...])
    then maps.first.show(). No more request/mapType plumbing in pickers.
  • Misconfiguration warning (iOS): debug builds print a warning when a map
    passed to discovery is missing from LSApplicationQueriesSchemes, naming
    the exact scheme to add. Previously indistinguishable from "not installed".
  • Official app icons: 256×256 PNG icons sourced from iTunes and Google Play
    Store APIs, embedded as Uint8List. No flutter_svg dependency needed.
    Run dart run tool/fetch_icons.dart to refresh.
  • Generic native layer: iOS/Android detection is driven entirely from
    Dart. The native code has zero map-specific knowledge.

Breaking Changes:

  • MapType enum → MapApp objects: MapType.googleMapApp.google.
    Dot-shorthand call sites like show(map: .google) compile unchanged.
  • Discovery takes an explicit list: getSupportedMaps()
    getSupportedMaps([.apple, .google, .waze]), getAvailableMaps()
    getAvailableMaps(myMaps). Use MapApp.all for every supported map (this
    opts out of tree shaking).
  • Icons are PNG bytes, not SVG assets: SvgPicture.asset(map.icon)
    Image.memory(map.iconBytes). No extra dependencies needed. flutter_svg
    is no longer required.
  • SupportedMap: map.mapTypemap.map (a MapApp),
    map.displayNamemap.name. Entries returned by a request are directly
    launchable via map.show().
  • Persisted map names: MapType.values.byName(saved)
    myMaps.firstWhere((m) => m.id == saved). MapApp.id matches the old
    enum names, so stored preferences keep working.
  • Removed maps: truckmeister (discontinued by Flitsmeister) and
    spedionNavigation (integrated module in the SPEDION fleet app, not a
    standalone map) have been removed. Use the custom MapApp subclass feature
    to add them back if needed.

What's Changed

Full Changelog: v5.0.1...v6.0.0