fleetDevicesProvider top-level property

AutoDisposeProvider<AsyncValue<List<Device>>> fleetDevicesProvider
final

Domain providers Provides a list of devices based on the currently logged-in user.

The list will contain all the devices in the currently logged-in dealer's fleet.

Implementation

/// Provides a list of devices based on the currently logged-in user.
///
/// The list will contain all the devices in the currently logged-in
/// dealer's fleet.
final fleetDevicesProvider = Provider.autoDispose<AsyncValue<List<Device>>>(
  (ref) {
    return ref
        .watch(fleetDevicesApiProvider)
        .mapValue((generators) => generators.map(dtoToDevice).toList());
  },
);