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