PayEngineField class

Represents an input field in the PayEngine system.

A PayEngineField defines an input field with properties such as its name, type, placeholder text, keyboard type, whether it is required, and an optional validation pattern.

Example Usage:

final emailField = PayEngineField(
  name: "email",
  type: "text",
  placeholder: "Enter your email",
  isRequired: true,
  keyboardType: PayEngineKeyboardType.alphabet,
  pattern: r"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$"
);
print(emailField.toJson());

Constructors

PayEngineField(String name, String type, String placeholder, bool isRequired, {String? pattern, PayEngineKeyboardType keyboardType = PayEngineKeyboardType.normal})
Creates an instance of PayEngineField.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isRequired → bool
Determines whether the field is required for submission.
final
keyboardType → PayEngineKeyboardType
Specifies the type of keyboard to be displayed when entering input.
final
name → String
The unique identifier for the field.
final
pattern → String?
An optional regular expression pattern to validate the field’s input.
final
placeholder → String
The placeholder text displayed when the field is empty.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The type of the field (e.g., "text", "password", "email").
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts the PayEngineField instance to a JSON map.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited