CurrentNullableDateTimeProperty class
An CurrentProperty 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 CurrentStateChanged event by default. This includes automatically triggering a UI rebuild.
- Inheritance
-
- Object
- CurrentProperty<
DateTime?> - CurrentNullableDateTimeProperty
Constructors
- CurrentNullableDateTimeProperty({DateTime? value, String? propertyName})
- CurrentNullableDateTimeProperty.now({String? propertyName})
-
Factory constructor for initializing an CurrentNullableDateTimeProperty 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 - isDirty → bool
-
Returns true if the value of this CurrentProperty is different from the originalValue.
no setterinherited
- isNotNull → bool
-
Returns true if the value of this CurrentProperty is not null.
no setterinherited
- isNull → bool
-
Returns true if the value of this CurrentProperty is null.
no setterinherited
- isPrimitiveType → bool
-
finalinherited
- 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
-
registeredBindings
→ Iterable<
CurrentViewModelBinding> -
Helper bindings registered directly against this property.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- second → int?
-
The second
[0...59].no setter - sourceHashCode → int
-
finalinherited
- 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?
-
Returns the current value of this CurrentProperty.
Setting the value will update the value of this CurrentProperty and trigger a UI update if the new value is different from the current value.
If
Tis a reference type, setting the value to a new instance ofTwith the same properties as the current value will still trigger a UI update since the reference has changed.getter/setter pairinherited - viewModel → CurrentStateViewModel
-
Returns the instance of the CurrentStateViewModel 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
durationadded to this CurrentNullableDateTimeProperty. -
call(
DateTime? value, {bool notifyChange = true, bool setAsOriginal = false}) → void -
Updates the underlying
valuefor this CurrentProperty.inherited -
compareTo(
DateTime other) → int -
Compares this DateTime object to
other, returning zero if the values are equal. -
difference(
DateTime other) → Duration? - this CurrentNullableDateTimeProperty.
-
equals(
dynamic other) → bool -
Checks if
otheris equal to the value of this CurrentProperty.inherited -
hasValueChanged(
DateTime? currentValue, DateTime? originalValue) → bool -
Determines whether the current value differs from the original value.
inherited
-
isAfter(
DateTime other) → bool -
Returns true if this CurrentNullableDateTimeProperty occurs after
other. -
isAtSameMomentAs(
DateTime other) → bool -
Returns true if this CurrentNullableDateTimeProperty occurs at the same moment as
other. -
isBefore(
DateTime other) → bool -
Returns true if this CurrentNullableDateTimeProperty occurs before
other. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerBinding(
CurrentViewModelBinding binding) → void -
Registers a helper binding against this property.
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(
CurrentStateViewModel viewModel) → void -
Links this CurrentProperty instance with an CurrentStateViewModel.
inherited
-
subtract(
Duration duration) → DateTime? -
Returns a new DateTime instance with
durationsubtracted from this CurrentNullableDateTimeProperty. -
toIso8601String(
) → String? - Returns an ISO-8601 full-precision extended format representation.
-
toLocal(
) → DateTime? - Returns this DateTime value in the local time zone.
-
toNull(
) → void - Sets the value to null
-
toString(
) → String -
A string representation of this object.
inherited
-
toUtc(
) → DateTime? - Returns this DateTime value in the UTC time zone.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
parse(
String formattedString, {String? propertyName}) → CurrentNullableDateTimeProperty -
Constructs a new CurrentNullableDateTimeProperty instance based on
formattedString. -
tryParse(
String formattedString, {String? propertyName}) → CurrentNullableDateTimeProperty -
Works like parse except that this function returns
nullwhere parse would throw a FormatException.