CustomField class
Model representing a custom configuration field for clone configurations.
This model allows users to define additional fields beyond the standard configuration options. Custom fields can be used to store client-specific data or feature flags.
Supported types: 'string', 'int', 'bool', 'double'
Example:
final customField = CustomField(
name: 'apiTimeout',
type: 'int'
);
Constructors
- CustomField({required String name, required String type})
- Creates a new CustomField instance.
-
CustomField.fromJson(Map<
String, dynamic> json) -
Creates a CustomField instance from a JSON map.
factory
- CustomField.fromYaml(Map yaml)
-
Creates a CustomField instance from a YAML map.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the custom field (e.g., 'apiTimeout', 'enableFeatureX').
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The data type of the field. Supported values: 'string', 'int', 'bool', 'double'.
final
Methods
-
isValidType(
) → bool - Validates if the type is one of the supported types.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts this CustomField to a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited