MastodonNotification class
Mastodon notification.
Corresponds to the response from /api/v1/notifications.
- Annotations
-
- @JsonSerializable(fieldRename: FieldRename.snake)
Constructors
- MastodonNotification({required String id, required MastodonNotificationType type, required DateTime createdAt, required MastodonAccount account, MastodonStatus? status, MastodonRelationshipSeveranceEvent? relationshipSeveranceEvent, MastodonAccountWarning? moderationWarning})
-
const
-
MastodonNotification.fromJson(Map<
String, dynamic> json) -
factory
Properties
- account → MastodonAccount
-
Account that triggered the notification.
final
- createdAt → DateTime
-
Timestamp when the notification was created.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Internal ID of the notification.
final
- moderationWarning → MastodonAccountWarning?
-
Details of the moderation warning. Non-null only for
MastodonNotificationType.moderationWarning.
final
- relationshipSeveranceEvent → MastodonRelationshipSeveranceEvent?
-
Details of the relationship severance event.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → MastodonStatus?
-
Associated status. Null depending on the notification type.
final
- type → MastodonNotificationType
-
Type of the notification.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited