Field class
Constructors
-
Field(String type, String identifier)
-
Create a new field. A field is a property of a class.
-
Field.fromEntry(MapEntry<String, String> entry)
-
Retrieve a field from a key-value pair. This allows you to get fields from
configuration .yaml files.
factory
Properties
-
annotations
↔ String?
-
The annotations of the field. Eg.
override will be represented as @override
inserted above the field declaration.
getter/setter pair
-
assignment
↔ String?
-
The default value of the field. A field with an assignment will be
represented as such
myVar = defaultValue.
getter/setter pair
-
empty
→ String
-
Get an empty representation of this field.
no setter
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
identifier
↔ String
-
The identifier of the variable. Eg.
myVar as in String myVar.
getter/setter pair
-
late
↔ bool
-
Whether this field should be prefixed with
late.
getter/setter pair
-
modifier
↔ String?
-
The modifier of this field. Eg.
final, var, 'const`.
getter/setter pair
-
nullable
↔ bool
-
Whether this variable is nullable or not. A nullable variable will
be represented by appending a
? at the end of its type.
getter/setter pair
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
static
↔ bool
-
Whether this field should be prefixed with
static.
getter/setter pair
-
type
↔ String
-
The data type of the variable. Eg.
String, int, Object.
getter/setter pair