fieldToJson static method
Json
fieldToJson(
- Field field
)
Implementation
static Json fieldToJson(Field field) {
final String fieldTypeRepresentation = field.runtimeType.toString();
if (field is BinaryField) {
return field.toJson();
} else if (field is BoolField) {
return field.toJson();
} else if (field is ColorField) {
return field.toJson();
} else if (field is DateTimeField) {
return field.toJson();
} else if (field is EnumField) {
return field.toJson();
} else if (field is FontField) {
return field.toJson();
} else if (field is HeaderField) {
return field.toJson();
} else if (field is IconField) {
return field.toJson();
} else if (field is IdField) {
return field.toJson();
} else if (field is ModelsSelectorField) {
return field.toJson();
} else if (field is StringField) {
return field.toJson();
} else if (field is MultiSelectorField) {
return field.toJson();
} else if (field is NumberField) {
return field.toJson();
} else if (field is QueryFilterField) {
return field.toJson();
} else if (field is QueryFilterValueField) {
return field.toJson();
} else if (field is ScreenField) {
return field.toJson();
} else if (field is SelectorField) {
return field.toJson();
} else if (field is StructureField) {
return field.toJson();
} else if (field is StructuredField) {
return field.toJson();
} else if (field is DynamicField) {
return field.toJson();
}
// TODO(alphamikle): [FIELDS] Add new fields here
throw UnimplementedError('Not found json encoder for field "$fieldTypeRepresentation"');
}