EmpireNullableStringProperty class Null safety

An EmpireProperty with similar characteristics as a dart String object

The underlying value can be null.

You can easily check for null by accessing the isNull or isNotNull properties.

When the value of this changes, it will send a EmpireStateChanged event by default. This includes automatically triggering a UI rebuild.

Inheritance

Constructors

EmpireNullableStringProperty(String? value, EmpireViewModel viewModel, {String? propertyName})

Properties

hashCode int
The hash code for this object.
read-only, inherited
isEmpty bool
Whether the string value is empty
read-only
isNotEmpty bool
Whether the string value is empty or not.
read-only
isNotNull bool
read-only, inherited
isNull bool
read-only, inherited
length int
The length of the string value.
read-only
originalValue String?
read-only, inherited
propertyName String?
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value String?
read-only, inherited

Methods

call(String? value, {bool notifyChange = true}) → void
inherited
contains(String other) bool
Whether the string value contains a match of other.
equals(dynamic other) bool
Checks if other is equal to the value of this EmpireProperty
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
reset({bool notifyChange = true}) → void
Resets the value to what it was initialized with.
inherited
set(String? value, {bool notifyChange = true}) String?
Updates the property value. Notifies any listeners to the change
inherited
setOriginalValueToCurrent() → void
Updates the original value to what the current value of this property is.
inherited
substring(int start, [int? end]) String?
The substring of the string value from start, inclusive, to end, exclusive.
toString() String
A string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator.
inherited