init method
/// Initializes the platform interface with id
.
This method is called when the plugin is first initialized.
Implementation
@override
Future<void> init(int mapId) {
MethodChannel? channel = _channels[mapId];
if (channel == null) {
channel = MethodChannel('amap_flutter_map_$mapId');
channel.setMethodCallHandler((call) => _handleMethodCall(call, mapId));
_channels[mapId] = channel;
}
return channel.invokeMethod<void>('map#waitForMap');
}