EmpireNullableDateTimeProperty class

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, String? propertyName})
EmpireNullableDateTimeProperty.now({String? propertyName})
Factory constructor for initializing an EmpireNullableDateTimeProperty to the current Date/Time.
factory

Properties

day int?
The day of the month [1..31].
no setter
hashCode int
The hash code for this object.
no setterinherited
hour int?
The hour of the day, expressed as in a 24-hour clock [0..23].
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
isUtc bool?
True if this DateTime is set to UTC time.
no setter
microsecond int?
The microsecond [0...999].
no setter
microsecondsSinceEpoch int?
The number of microseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
no setter
millisecond int?
The millisecond [0...999].
no setter
millisecondsSinceEpoch int?
The number of milliseconds since the "Unix epoch" 1970-01-01T00:00:00Z (UTC).
no setter
minute int?
The minute [0...59].
no setter
month int?
The month [1..12].
no setter
originalValue DateTime?
no setterinherited
propertyName String?
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
second int?
The second [0...59].
no setter
timeZoneName String?
The time zone name.
no setter
timeZoneOffset Duration?
The time zone offset, which is the difference between local time and UTC.
no setter
value DateTime?
no setterinherited
viewModel EmpireViewModel
Returns the instance of the EmpireViewModel this property is associated with.
no setterinherited
weekday int?
The day of the week monday..sunday.
no setter
year int?
The year.
no setter

Methods

add(Duration duration) DateTime?
Returns a new DateTime instance with duration added to this.
call(DateTime? value, {bool notifyChange = true, bool setAsOriginal = false}) → void
Updates the underlying value for this EmpireProperty.
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 nonexistent method or property is accessed.
inherited
reset({bool notifyChange = true}) → void
Resets the value to the originalValue.
inherited
set(DateTime? value, {bool notifyChange = true, bool setAsOriginal = false}) 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
setViewModel(EmpireViewModel viewModel) → void
Links this EmpireProperty instance with an EmpireViewModel.
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

Static Methods

parse(String formattedString, {String? propertyName}) EmpireNullableDateTimeProperty
Constructs a new EmpireNullableDateTimeProperty instance based on formattedString.
tryParse(String formattedString, {String? propertyName}) EmpireNullableDateTimeProperty
Works like parse except that this function returns null where parse would throw a FormatException.