Event class
An event, e.g. a birthday or anniversary
- Annotations
- @JsonSerializable(disallowUnrecognizedKeys: true)
Constructors
- Event(DateTime date, {EventLabel label: EventLabel.birthday, String customLabel: "", bool noYear: false})
-
Event.fromJson(Map<
String, dynamic> json) -
factory
Properties
- customLabel ↔ String
-
If customLabel is EventLabel.custom, free-form user-chosen label.
@JsonKey(defaultValue: ""), read / write
- date ↔ DateTime
-
The event date. [...]
@JsonKey(required: true, fromJson: _parseDate), read / write
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- label ↔ EventLabel
-
The label or type of event it is. If
custom
, the free-form label can be found in customLabel. [...]@JsonKey(defaultValue: EventLabel.birthday), read / write - noYear ↔ bool
-
Whether the date has no year associated to it. iOS only.
@JsonKey(defaultValue: false), read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited