FlexiDateData class

A flexible container for date components that provides a robust parsing/building mechanism. If the input type is known to be a String, Map or DateTime, then use the corresponding constructors.

FlexiDateParser.tryFrom will / attempt to construct a FlexibleDate instance, and will return null if none could be constructed. FlexiDateParser.from will / attempt to construct a FlexibleDate instance, and will raise an exception if unable to create a FlexibleDate instance

Implemented types
Available extensions

Constructors

FlexiDateData({int? day, int? month = 1, int? year, Object? source, bool isAmbiguous = false})
FlexiDateData.fromDateTime(DateTime dateTime)
FlexiDateData.fromMap(Map toParse)
from a map, assuming keys kday, kmonth, kyear
FlexiDateData.now()
factory

Properties

day int?
getter/setter pairoverride
hashCode int
The hash code for this object.
no setteroverride
isAmbiguous bool
getter/setter pairoverride-getter
isValid bool
no setteroverride
month int?
getter/setter pairoverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source Object?
getter/setter pairoverride-getter
year int?
getter/setter pairoverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → dynamic
override
toMap() Map<String, int?>
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override