Metadata.deserialize constructor
Metadata.deserialize(
- Map serialized
Deserializes the result of Metadata.serialize into a new Metadata.
Implementation
Metadata.deserialize(Map serialized)
: testOn = serialized['testOn'] == null
? PlatformSelector.all
: PlatformSelector.parse(serialized['testOn'] as String),
timeout = _deserializeTimeout(serialized['timeout']),
_skip = serialized['skip'] as bool?,
skipReason = serialized['skipReason'] as String?,
_verboseTrace = serialized['verboseTrace'] as bool?,
_chainStackTraces = serialized['chainStackTraces'] as bool?,
_retry = (serialized['retry'] as num?)?.toInt(),
tags = Set.from(serialized['tags'] as Iterable),
onPlatform = {
for (var pair in serialized['onPlatform'] as List)
PlatformSelector.parse(pair.first as String):
Metadata.deserialize(pair.last as Map)
},
forTag = (serialized['forTag'] as Map).map((key, nested) => MapEntry(
BooleanSelector.parse(key as String),
Metadata.deserialize(nested as Map))),
languageVersionComment =
serialized['languageVersionComment'] as String?;