tree: 728aecebd4e095ff14b2c84f803c45d988d00c4a [path history] [tgz]
  1. android/
  2. example/
  3. lib/
  4. test/
  5. AUTHORS
  6. CHANGELOG.md
  7. LICENSE
  8. pubspec.yaml
  9. README.md
packages/google_maps_flutter/google_maps_flutter_android/README.md

google_maps_flutter_android

The Android implementation of google_maps_flutter.

Usage

This package is endorsed, which means you can simply use google_maps_flutter normally. This package will be automatically included in your app when you do.

Display Mode

This plugin supports two different platform view display modes. The default display mode is subject to change in the future, and will not be considered a breaking change, so if you want to ensure a specific mode you can set it explicitly:

import 'package:google_maps_flutter_android/google_maps_flutter_android.dart';
import 'package:google_maps_flutter_platform_interface/google_maps_flutter_platform_interface.dart';

void main() {
  // Require Hybrid Composition mode on Android.
  final GoogleMapsFlutterPlatform mapsImplementation =
      GoogleMapsFlutterPlatform.instance;
  if (mapsImplementation is GoogleMapsFlutterAndroid) {
    mapsImplementation.useAndroidViewSurface = true;
  }
  // ยทยทยท
}

Hybrid Composition

This is the current default mode, and corresponds to useAndroidViewSurface = true. It ensures that the map display will work as expected, at the cost of some performance.

Texture Layer Hybrid Composition

This is a new display mode used by most plugins starting with Flutter 3.0, and corresponds to useAndroidViewSurface = false. This is more performant than Hybrid Composition, but currently misses certain map updates.

This mode will likely become the default in future versions if/when the missed updates issue can be resolved.