AlarmMetadata class

Displayable metadata attached to an alarm and surfaced in its Live Activity.

Maps to a small AlarmKit AlarmMetadata value. All fields are optional, and empty strings are treated as absent. The default widget renders the icon next to the alarm title and the subtitle beneath it; consumers can restyle that rendering in their own (CLI-copied) widget.

Annotations

Constructors

AlarmMetadata({String? icon, String? subtitle})
Creates alarm metadata; all fields are optional.
const
AlarmMetadata.fromMap(Map<String, dynamic> map)
Builds AlarmMetadata from a platform-channel map. Empty strings are normalized to null.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
icon String?
An SF Symbol name shown alongside the alarm title (e.g. "pills.fill").
final
isEmpty bool
Whether no fields are set (after empty-string normalization).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subtitle String?
A secondary line shown beneath the alarm title.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Serializes to a map for the method channel, omitting null/empty fields.
toString() String
A string representation of this object.
override

Operators

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