updateShouldNotify method

  1. @override
bool updateShouldNotify(
  1. covariant LocationContext oldWidget
)
override

Notify only when the location has changed

Implementation

@override
bool updateShouldNotify(LocationContext oldWidget) {
  return currentLocation != oldWidget.currentLocation ||
      lastLocation != oldWidget.lastLocation ||
      error != oldWidget.error;
}