simple_google_maps_flutter 0.0.1 copy "simple_google_maps_flutter: ^0.0.1" to clipboard
simple_google_maps_flutter: ^0.0.1 copied to clipboard

A clone of google_maps_flutter but use simple_platform_view instead of AndroidView for performance optimization

A clone of google_maps_flutter but use simple_platform_view instead of AndroidView for performance optimization

Getting started #

Please check the simple_platform_view package before using this package, as simple_platform_view comes with several drawbacks that need to be considered beforehand.

Usage #

Platform Status
Android
iOS ⚠️

Add the following dependency to your pubspec.yaml file:

dependencies:
  google_maps_flutter:
  simple_google_maps_flutter:

Android:

Make FlutterView transparent (required)

Add the following code to MainActivity.kt:

  import androidx.annotation.NonNull;
  import io.flutter.embedding.android.FlutterActivity;
  import io.flutter.embedding.android.FlutterActivityLaunchConfigs.BackgroundMode;

  public class MainActivity extends FlutterActivity {

      @NonNull
      @Override
      protected BackgroundMode getBackgroundMode() {
          return BackgroundMode.transparent;
      }
  }

Replace the default GoogleMapsFlutterPlatform.instance with the modified version:

  import 'package:simple_google_maps_flutter/simple_google_maps_flutter.dart';

  @override
  void initState() {
      super.initState();
      if (Platform.isAndroid) {
          SimpleGoogleMapsFlutterAndroid.registerWith();
      }
  }

Other usage is just like google_maps_flutter package

Demo
2
likes
0
pub points
8%
popularity

Publisher

unverified uploader

A clone of google_maps_flutter but use simple_platform_view instead of AndroidView for performance optimization

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, google_maps_flutter_platform_interface, simple_platform_view, stream_transform

More

Packages that depend on simple_google_maps_flutter