flutter_map_toolkit 0.0.4 copy "flutter_map_toolkit: ^0.0.4" to clipboard
flutter_map_toolkit: ^0.0.4 copied to clipboard

A package on top of `flutter_map[https://pub.dev/packages/flutter_map]` containing some useful plugins

this package contains plugins for the flutter_map package.

Installation #

  • you must add plugins to FlutterMap
final plugins = [
    PointSelectorPlugin(),
    DirectionsPlugin(),
    LiveMarkerPlugin(),
  ];
  • then set FlutterMap widget's plugins property
FlutterMap(
    plugins:plugins, 
    ...,
    )
  • now you can use plugins in your app using FlutterMap's layers property
FlutterMap(
    plugins:plugins, 
    layers:[
        TileLayerOptions(
                ...,
            ),
        LiveMarkerOptionsWithStream(
                ...
            ),
        ...,
    ]
    ...,
    )

Plugins #

Point Selector Plugin #

  • contains two modes

Center point selector

  • Select a single point on the map Tap Point Selector

center_point_selector

Tap Point Selector

  • select a point when user taps on the map

tap_point_selector

Live Markers Plugin #

  • Live marker with refresh rate

using a LiveMarkerOptionsWithRefreshRate to set the refresh rate and the markers info provider

  • Live marker with stream

using a LiveMarkerOptionsWithStream and PointInfoStreamedProvider

  • this plugin will refresh the markers when the stream is updated

  • this plugin will send a new MapInformationRequestParams to the provider when the user interacted with the map

there is no default provider for this plugin so you must implement PointInfoProvider or PointInfoStreamedProvider inside your code

Directions Plugin (WIP) #

center_point_selector

this plugin can be used to draw routes on the map and can be controlled with a DirectionsLayerController

this plugin comes with a MapboxDirectionProvider

  • this will use mapbox api to get directions for given waypoints
DirectionsLayerOptions(
  provider: mapboxProvider,
  controller: directionController,
  loadingBuilder: (context) {
    return const Center(
      child: CircularProgressIndicator(),
    );
  },
  ...,
)
2
likes
100
pub points
38%
popularity

Publisher

verified publisherhemend.com

A package on top of `flutter_map[https://pub.dev/packages/flutter_map]` containing some useful plugins

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

bloc, flutter, flutter_bloc, flutter_map, latlong2

More

Packages that depend on flutter_map_toolkit