ActiveDateTime class

ActiveDateTime ordinary dart DateTime. When an update is done an ActiveStateChanged event is triggered which in-turn makes a UI rebuild of that widget.

Has similar characteristics as DateTime and The value cannot be null

Inheritance

Constructors

ActiveDateTime.new(DateTime value, {String? typeName})
ActiveDateTime.now({String? typeName})
Extends DateTime
factory

Properties

activeController ActiveController
Returns the instance of the ActiveController this property is associated with.
no setterinherited
day int
final flutterRelease = DateTime.parse('1969-07-20 20:18:04Z'); print(flutterRelease.day); // 20
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
mockValue DateTime
no setterinherited
month int
final flutterRelease = DateTime.parse('1969-07-20 20:18:04Z'); print(flutterRelease.month); // 7 assert(flutterRelease.month == DateTime.july);
no setter
originalValue DateTime
no setterinherited
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
typeName String?
getter/setter pairinherited
value DateTime
no setterinherited
weekday int
The day of the week monday..sunday.
no setter
year int
final flutterRelease = DateTime.parse('1969-07-20 20:18:04Z'); print(flutterRelease.year); // 1969
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 ActiveType.
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 ActiveType
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
setActiveController(ActiveController activeController) → void
Links this ActiveType instance with an ActiveController.
inherited
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

Static Methods

parse(String formattedString, {String? typeName}) ActiveDateTime
Constructs a new ActiveDateTime instance based on formattedString.