Field.fromJson constructor

Field.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory Field.fromJson(Map<String, Object?> json) {
  return Field(
    contextsCount: (json[r'contextsCount'] as num?)?.toInt(),
    description: json[r'description'] as String?,
    id: json[r'id'] as String? ?? '',
    isLocked: json[r'isLocked'] as bool? ?? false,
    isUnscreenable: json[r'isUnscreenable'] as bool? ?? false,
    key: json[r'key'] as String?,
    lastUsed: json[r'lastUsed'] != null
        ? FieldLastUsed.fromJson(json[r'lastUsed']! as Map<String, Object?>)
        : null,
    name: json[r'name'] as String? ?? '',
    projectsCount: (json[r'projectsCount'] as num?)?.toInt(),
    schema: JsonTypeBean.fromJson(
        json[r'schema'] as Map<String, Object?>? ?? const {}),
    screensCount: (json[r'screensCount'] as num?)?.toInt(),
    searcherKey: json[r'searcherKey'] as String?,
  );
}