Event class

An event.

Once created, no properties of an Event object may be changed.

Annotations
  • @immutable

Constructors

Event({required DateTime event, String? label})
Constructs an Event instance.
const
Event.fromJson(String json)
Constructs an Event instance from a json string.
factory
Event.fromMap(Map<String, dynamic> map)
Constructs an Event instance from a map.

Properties

event DateTime
The date of the event.
final
hashCode int
The hash code for this object.
no setteroverride
label String?
The label.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({DateTime? event, String? label}) Event
Creates a copy of this Event instance but with the given fields replaced with the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
Creates a JSON string representing this Event instance.
toMap() Map<String, dynamic>
Creates a Map<String, dynamic> representing this Event instance.
toString() String
A string representation of this object.
override

Operators

operator ==(covariant Event other) bool
The equality operator.
override