FormioUtils class
A set of utility functions used throughout the Form.io Flutter integration.
These functions handle tasks such as safe JSON parsing, null checks, and simple data transformations. Common utility functions used throughout the Form.io Flutter SDK.
Includes validators, date/number formatting helpers, and safe JSON helpers.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
formatDate(
DateTime date, {String? pattern}) → String - Formats a DateTime object to a readable string.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
safeParseDate(
String? input) → DateTime? - Safely parses a date string into DateTime. Returns null on failure.
-
safeParseNumber(
String? input) → num? - Parses a string into a num if valid. Returns null otherwise.
-
toString(
) → String -
A string representation of this object.
inherited
-
tryGet(
Map< String, dynamic> ? json, String key) → dynamic - Safely accesses a nested key in a JSON map. Returns null if missing.
-
validateRequired(
String? input, String fieldName) → String? - Validates that a required field is not empty or null.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited