init method
Initializes the platform interface with id
.
This method is called when the plugin is first initialized.
Implementation
@override
Future<dynamic> init(int viewId) {
MethodChannel? channel;
if (!_channels.containsKey(viewId)) {
channel = MethodChannel('flutter_google_street_view_$viewId');
channel.setMethodCallHandler(
(MethodCall call) => _handleMethodCall(call, viewId));
_channels[viewId] = channel;
}
return channel!.invokeMethod<void>('streetView#waitForStreetView');
}