CustomField.fromJson constructor

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

Creates a CustomField instance from a JSON map.

The JSON map should contain 'name' and 'type' keys.

Example:

final json = {'name': 'apiTimeout', 'type': 'int'};
final field = CustomField.fromJson(json);

Implementation

factory CustomField.fromJson(Map<String, dynamic> json) {
  return CustomField(
    name: json['name'] as String,
    type: json['type'] as String,
  );
}