EmpireNullableDateTimeProperty class Null safety

An EmpireProperty with similar characteristics as a an ordinary dart bool object.

Then underlying bool value CAN be null

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

Inheritance

Constructors

EmpireNullableDateTimeProperty(DateTime? value, EmpireViewModel viewModel, {String? propertyName})

Properties

day int?
The day of the month [1..31].
read-only
hashCode int
The hash code for this object.
read-only, inherited
hour int?
The hour of the day, expressed as in a 24-hour clock [0..23].
read-only
isNotNull bool
read-only, inherited
isNull bool
read-only, inherited
isUtc bool?
True if this DateTime is set to UTC time.
read-only
microsecond int?
The microsecond [0...999].
read-only
microsecondsSinceEpoch int?
The number of microseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
read-only
millisecond int?
The millisecond [0...999].
read-only
millisecondsSinceEpoch int?
The number of milliseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
read-only
minute int?
The minute [0...59].
read-only
month int?
The month [1..12].
read-only
originalValue DateTime?
read-only, inherited
propertyName String?
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
second int?
The second [0...59].
read-only
timeZoneName String?
The time zone name.
read-only
timeZoneOffset Duration?
The time zone offset, which is the difference between local time and UTC.
read-only
value DateTime?
read-only, inherited
weekday int?
The day of the week monday..sunday.
read-only
year int?
The year.
read-only

Methods

add(Duration duration) DateTime?
Returns a new DateTime instance with duration added to this.
call(DateTime? value, {bool notifyChange = true}) → void
inherited
compareTo(DateTime other) int
Compares this DateTime object to other, returning zero if the values are equal.
difference(DateTime other) Duration?
this.
equals(dynamic other) bool
Checks if other is equal to the value of this EmpireProperty
inherited
isAfter(DateTime other) bool
Returns true if this occurs after other.
isAtSameMomentAs(DateTime other) bool
Returns true if this occurs at the same moment as other.
isBefore(DateTime other) bool
Returns true if this occurs before other.
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(DateTime? value, {bool notifyChange = true}) DateTime?
Updates the property value. Notifies any listeners to the change
inherited
setNull({bool notifyChange = true}) → void
Sets the value to null
setOriginalValueToCurrent() → void
Updates the original value to what the current value of this property is.
inherited
subtract(Duration duration) DateTime?
Returns a new DateTime instance with duration subtracted from this.
toIso8601String() String?
Returns an ISO-8601 full-precision extended format representation.
toLocal() DateTime?
Returns this DateTime value in the local time zone.
toString() String
A string representation of this object.
inherited
toUtc() DateTime?
Returns this DateTime value in the UTC time zone.

Operators

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