fromMap static method
- Map<
String, dynamic> ? map, { - EnumMethod? enumMethod,
Gets a possible InAppWebViewHitTestResult instance from a Map value.
Implementation
static InAppWebViewHitTestResult? fromMap(
Map<String, dynamic>? map, {
EnumMethod? enumMethod,
}) {
if (map == null) {
return null;
}
final instance = InAppWebViewHitTestResult(
extra: map['extra'],
type: switch (enumMethod ?? EnumMethod.nativeValue) {
EnumMethod.nativeValue => InAppWebViewHitTestResultType.fromNativeValue(
map['type'],
),
EnumMethod.value => InAppWebViewHitTestResultType.fromValue(
map['type'],
),
EnumMethod.name => InAppWebViewHitTestResultType.byName(map['type']),
},
);
return instance;
}