Refactor. Fires marker calibration
This commit is contained in:
parent
574c1afc33
commit
f970c6b4fe
9 changed files with 128 additions and 51 deletions
27
lib/dummyMapPlugin.dart
Normal file
27
lib/dummyMapPlugin.dart
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
import 'package:flutter/src/widgets/framework.dart';
|
||||
import 'package:flutter_map/plugin_api.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class DummyMapPluginOptions extends LayerOptions {
|
||||
final String text;
|
||||
|
||||
DummyMapPluginOptions({this.text = ""});
|
||||
}
|
||||
|
||||
// https://github.com/apptreesoftware/flutter_map/blob/master/flutter_map_example/lib/pages/plugin_api.dart
|
||||
class DummyMapPlugin extends MapPlugin {
|
||||
|
||||
@override
|
||||
Widget createLayer(LayerOptions options, MapState mapState) {
|
||||
if (options is DummyMapPluginOptions) {
|
||||
return const SizedBox();
|
||||
}
|
||||
throw ("Unknown options type for DummyMapPlugin"
|
||||
"plugin: $options");
|
||||
}
|
||||
|
||||
@override
|
||||
bool supportsLayer(LayerOptions options) {
|
||||
return options is DummyMapPluginOptions;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue