dispose method

  1. @override
void dispose()
override

Implementation

@override
dispose() {
  _disposed = true;
  disposeMoveAttribution();
  // Releases anything parked in [_withMap] waiting for a map that will now
  // never be created.
  if (!_disposal.isCompleted) _disposal.complete();
  // The platform controller is *not* disposed here: `GoogleMap` owns it and
  // disposes it from its own `State.dispose`. Doing it here too disposes it
  // twice, which on web tears the map registry entry down and then fails a
  // null check on the second pass.
  _platformController = null;
}