fromMap static method

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

Gets a possible PermissionResponse instance from a Map value.

Implementation

static PermissionResponse? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = PermissionResponse();
  instance.action = PermissionResponseAction.fromNativeValue(map['action']);
  instance.resources = List<PermissionResourceType>.from(map['resources']
      .map((e) => PermissionResourceType.fromNativeValue(e)!));
  return instance;
}