asMap<E, F> method

Map<E, F> asMap <E, F>()

For using this method, We're assuming it is safe to transform to utf8 Strings. Return the bytes as a Map decoded using jsonDecode(). Same as as(). If the Key and Value are Strings, you can do asMap<String, String>() or get the dynamic form and do the cast yourself.

Implementation

Map<E, F> asMap<E, F>(){
  assert(_isStream != null && !_isStream);
  return jsonDecode(asString()) as Map<E, F>;
}