ActivityModel class

The model for an activity.

This model is used to store information about an activity, such as the title, description, location, and dates. It is used to display activities in the app and to store them in the Firestore database.

Annotations

Constructors

ActivityModel({required String id, String? title, @JsonKey(fromJson: activityDateFromJson, toJson: activityDateToJson) required (DateTime?, DateTime?) date, @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) DateTime? postDate, @JsonKey(fromJson: dateTimeFromJson, toJson: dateTimeToJson) DateTime? lastEdited, String? posterId, @Default("") String location, @Default("") String description, @Default("") String descriptionPlain, String? bannerDownloadURL, String? blurhash, String? linkedURL, @Default(ActivityCategory.leiden) ActivityCategory? category, @Default(true) bool sendNotification, @Default(true) bool createPhotoAlbum, String? photosFolderIdPublic, @JsonKey(fromJson: colorFromJson, toJson: colorToJson) @Default(Color(0xff006600)) Color color, @Default(false) bool isEdited})
const
factory
ActivityModel.fromEuropeJson(Map<String, dynamic> event, String urlPrefix)
Generates an ActivityModel from a map from the MyAEGEE API.
factory
ActivityModel.fromJson(Map<String, dynamic> json)
Generates an ActivityModel from a map.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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