ColumnEntity.fromJson constructor

ColumnEntity.fromJson(
  1. Map<String, dynamic> jsonRes
)

Implementation

factory ColumnEntity.fromJson(Map<String, dynamic> jsonRes) => ColumnEntity(
      primaryKey: asT<bool?>(jsonRes['primary_key']) ?? false,
      autoIncrease: asT<bool?>(jsonRes['auto_increase']) ?? false,
      name: asT<String?>(jsonRes['name']),
      title: asT<String?>(jsonRes['title']) ?? '',
      type: asT<String?>(jsonRes['type']) ?? 'string',
      format: asT<String?>(jsonRes['format']),
      description: asT<String?>(jsonRes['description']) ?? '',
      display: asT<bool?>(jsonRes['display']) ?? true,
      editable: asT<bool?>(jsonRes['editable']) ?? true,
      widthFactor: asT<double?>(jsonRes['width_factor']) ?? 0.2,
      inputDecoration: jsonRes['input_decoration'] == null
          ? null
          : InputDecorationEntity.fromJson(
              asT<Map<String, dynamic>>(jsonRes['input_decoration'])!),
      constrains: jsonRes['constrains'] == null
          ? null
          : ConstrainsEntity.fromJson(
              asT<Map<String, dynamic>>(jsonRes['constrains'])!),
      style: jsonRes['style'] == null
          ? null
          : StyleEntity.fromJson(
              asT<Map<String, dynamic>>(jsonRes['style'])!),
    );