fromMap static method

LoadedResource? fromMap(
  1. Map<String, dynamic>? map
)

Gets a possible LoadedResource instance from a Map value.

Implementation

static LoadedResource? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = LoadedResource(
    duration: map['duration'],
    initiatorType: map['initiatorType'],
    startTime: map['startTime'],
    url: map['url'] != null ? WebUri(map['url']) : null,
  );
  return instance;
}