fromMap static method

BrowserProcessExitedDetail? fromMap(
  1. Map<String, dynamic>? map, {
  2. EnumMethod? enumMethod,
})

Gets a possible BrowserProcessExitedDetail instance from a Map value.

Implementation

static BrowserProcessExitedDetail? fromMap(
  Map<String, dynamic>? map, {
  EnumMethod? enumMethod,
}) {
  if (map == null) {
    return null;
  }
  final instance = BrowserProcessExitedDetail(
    kind: switch (enumMethod ?? EnumMethod.nativeValue) {
      EnumMethod.nativeValue => BrowserProcessExitKind.fromNativeValue(
        map['kind'],
      ),
      EnumMethod.value => BrowserProcessExitKind.fromValue(map['kind']),
      EnumMethod.name => BrowserProcessExitKind.byName(map['kind']),
    }!,
    processId: map['processId'],
  );
  return instance;
}