CacheInfo.fromMap constructor

CacheInfo.fromMap(
  1. Map map
)

Implementation

CacheInfo.fromMap(Map map)
    : url = map['url'] as String,
      lazy = map['lazy'] as bool,
      belongTo = map['belongTo'] == null ? null : map['belongTo'] as String {
  fragments.addAll((map['fragments'] as List).map((e) => CacheFragment.fromMap(e as Map<dynamic, dynamic>)));
  current = map['current'] as int;
  total = map['total'] as int;
  if (map['headers'] != null) {
    headers = (map['headers'] as Map).cast<String, String>();
  }
}