PermissionsPolicyFeatureState.fromJson constructor

PermissionsPolicyFeatureState.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory PermissionsPolicyFeatureState.fromJson(Map<String, dynamic> json) {
  return PermissionsPolicyFeatureState(
    feature: PermissionsPolicyFeature.fromJson(json['feature'] as String),
    allowed: json['allowed'] as bool? ?? false,
    locator: json.containsKey('locator')
        ? PermissionsPolicyBlockLocator.fromJson(
            json['locator'] as Map<String, dynamic>)
        : null,
  );
}