FlutterGoogleStreetViewPlugin constructor
FlutterGoogleStreetViewPlugin(
- Map<String, dynamic> arg
)
Implementation
FlutterGoogleStreetViewPlugin(Map<String, dynamic> arg) {
debug("FlutterGoogleStreetViewPlugin:$arg");
_viewId = _streetViewId += 1;
debug("create new plugin, viewId:$viewId");
_div = DivElement()
..id = _getViewType(_viewId)
..style.width = '100%'
..style.height = '100%';
_divs[_viewId] = _div;
_plugins[_viewId] ??= this;
ui.platformViewRegistry.registerViewFactory(
_getViewType(_viewId),
(int viewId) => _div,
);
_setup(arg);
_methodChannel = MethodChannel(
'flutter_google_street_view_$viewId',
const StandardMethodCodec(),
registrar,
);
_methodChannel.setMethodCallHandler(_handleMethodCall);
}