EmpireNullableStringProperty class

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, String? propertyName})

Properties

hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the string value is empty
no setter
isNotEmpty bool
Whether the string value is empty or not.
no setter
isNotNull bool
Returns true if the value of this is not null.
no setterinherited
isNull bool
Returns true if the value of this is null.
no setterinherited
length int
The length of the string value.
no setter
originalValue String?
no setterinherited
propertyName String?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String?
no setterinherited
viewModel EmpireViewModel
Returns the instance of the EmpireViewModel this property is associated with.
no setterinherited

Methods

call(String? value, {bool notifyChange = true, bool setAsOriginal = false}) → void
Updates the underlying value for this EmpireProperty.
inherited
contains(String other, [int startIndex = 0]) 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 nonexistent method or property is accessed.
inherited
reset({bool notifyChange = true}) → void
Resets the value to the originalValue.
inherited
set(String? value, {bool notifyChange = true, bool setAsOriginal = false}) 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
setViewModel(EmpireViewModel viewModel) → void
Links this EmpireProperty instance with an EmpireViewModel.
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