toJson method

Map<String, dynamic> toJson()

Converts the PayEngineField instance to a JSON map.

This method is useful for serializing the object for API communication.

Example:

final json = field.toJson();
print(json);

Implementation

Map<String, dynamic> toJson() => {
      'name': name,
      'type': type,
      'placeholder': placeholder,
      'pattern': pattern,
      'isRequired': isRequired,
      'keyboardType': keyboardType.value,
    };