ToastCommand constructor

ToastCommand({
  1. ToastCommandId? id,
  2. String? arguments,
})

Implementation

ToastCommand({
  /// Specifies one command from the system-defined command list.
  /// These values correspond to available actions that the user can take.
  /// Two scenarios are available through the commands element.
  /// Only certain commands are used with a given scenario, as shown here:
  ///
  /// alarm
  ///   snooze
  ///   dismiss
  ///
  /// incomingCall
  ///   video
  ///   voice
  ///   decline
  ToastCommandId? id,

  /// An argument string that can be passed to the associated app to provide
  /// specifics about the action that it should execute in response to the user action.
  String? arguments,
}) {
  if (id != null) {
    _command.attributes.add(XmlAttribute(XmlName('id'), id.name));
  }
  if (arguments != null) {
    _command.attributes.add(XmlAttribute(XmlName('arguments'), arguments));
  }
}