getPersister method

Persister getPersister(
  1. GpsPointsView<GpsPoint> view
)

Returns the Persister registered to handled objects of the type of view or raises NoPersisterException if not found.

Implementation

Persister getPersister(GpsPointsView view) {
  final result = _knownPersisters[view.runtimeType];
  if (result == null) {
    throw NoPersisterException(
        'No persister found for type ${view.runtimeType}');
  } else {
    return result;
  }
}