dropdownMap method

Future<Map<T, String>> dropdownMap(
  1. BuildContext context, {
  2. int page = 0,
  3. int size = 20,
  4. Map<String, String> extraParams = const <String, String>{},
  5. bool forceOffline = false,
})

Implementation

Future<Map<T, String>> dropdownMap(
  BuildContext context, {
  int page = 0,
  int size = 20,
  Map<String, String> extraParams = const <String, String>{},
  bool forceOffline = false,
}) async =>
    (await list(
      context,
      page: page,
      size: size,
      extraParams: extraParams,
      forceOffline: forceOffline,
    ))
        .asMap()
        .map((_, T item) => MapEntry<T, String>(item, item.dropdownText));