Struct class
Represents a custom object type.
Constructors
Properties
- description → String?
-
The description of the signature, if any.
finalinherited
-
fields
→ Map<
String, $Type> -
The fields of the object.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The name of the type.
finalinherited
- nullable → bool
-
If true, the type is nullable. (e.g., int?).
finalinherited
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stringify → bool?
-
If set to
true, thetoStringmethod will be overridden to output this instance'sprops.no setterinherited
Methods
-
asNullable(
[bool nullable = true]) → $Type -
Returns a nullable version of this type.
override
-
canCast(
$Type other) → bool -
Returns true if this type can be implicitly cast to the
othertype.override -
cast(
$Type type, dynamic value) → dynamic -
Casts a
valueof this type to the specifiedtype.inherited -
lookup(
List< Struct> types) → Struct? -
Looks up a placeholder struct by its name in the provided
typesand Struct.defaults list.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts this signature to a JSON map.
inherited
-
toMap(
) → Map< String, dynamic> -
Converts the signature to a map.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited