notification method

Future<void> notification(
  1. String body, {
  2. String? title,
  3. String? appName,
  4. List<String> tags = const [],
})

A push the flow's backend would have sent — a beat the recipient sees, drawn the way their phone would draw it.

await s.tap('Pay');
await s.notification("Your cappuccino is ready — counter 3",
    title: "Barista's");

Like document it has no frame of its own. A viewer draws it over the nearest screen before it — which is what a real banner does — and supplies everything the payload leaves out: the project's own launcher icon, the banner's "now", the brightness the scenario ran under.

Deliberately unnamed as a step. A notification's words are the app's user-facing text, so they are translated and reworded; keying a comparison on them would read one flow under two languages as two different flows. The same reasoning the aligner already applies to a verb's visible-text target.

Implementation

Future<void> notification(
  String body, {
  String? title,
  String? appName,
  List<String> tags = const [],
}) => _beat(
  kind: ScenarioCaptureKind.notification,
  verb: 'notification',
  tags: tags,
  notification: ScenarioNotification(
    title: title,
    body: body,
    appName: appName,
  ),
);