CaptionEntity.fromJson constructor

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

Implementation

factory CaptionEntity.fromJson(Map<String, dynamic> jsonRes) => CaptionEntity(
      title: asT<String?>(jsonRes['title']),
      display: asT<bool?>(jsonRes['display']) ?? true,
      editable: asT<bool?>(jsonRes['editable']) ?? true,
      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'])!),
    );