removeDestination method

RaliUser removeDestination(
  1. String destinationName
)

Removes a destination by name

Implementation

RaliUser removeDestination(String destinationName) {
  final newDestinations = savedDestinations.where(
    (destination) => destination['name'] != destinationName
  ).toList();

  return copyWith(savedDestinations: newDestinations);
}