map method

Future<Map<String, String>> map(
  1. String name
)

Retrieve datatype values by name

Implementation

Future<Map<String, String>> map(String name) async {
  if (_cacheDataSources.containsKey(name)) {
    final data = await _cacheDataSources[name];
    return data;
  }
  final response = await dio.get('/datatype/$name');

  return _cacheDataSources[name] = response.data;
}