buildView method

  1. @override
Widget buildView(
  1. Map<String, dynamic> creationParams,
  2. OnPlatformViewCreatedCallback onPlatformViewCreated,
  3. Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers
)
override

Implementation

@override
Widget buildView(
    Map<String, dynamic> creationParams,
    OnPlatformViewCreatedCallback onPlatformViewCreated,
    Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers) {
  if (defaultTargetPlatform == TargetPlatform.android) {
    return AndroidView(
      viewType: 'plugins.flutter.io/mapmyindia_gl',
      onPlatformViewCreated: onPlatformViewCreated,
      gestureRecognizers: gestureRecognizers,
      creationParams: creationParams,
      creationParamsCodec: const StandardMessageCodec(),
    );
  } else if (defaultTargetPlatform == TargetPlatform.iOS) {
    return UiKitView(
      viewType: 'plugins.flutter.io/mapmyindia_gl',
      onPlatformViewCreated: onPlatformViewCreated,
      gestureRecognizers: gestureRecognizers,
      creationParams: creationParams,
      creationParamsCodec: const StandardMessageCodec(),
    );
  }
  return Text(
      '$defaultTargetPlatform is not yet supported by the maps plugin');
}