execute method

  1. @override
FutureOr<void> execute(
  1. BuildContext context, {
  2. Map<String, dynamic>? arguments,
})
override

Implementation

@override
FutureOr<void> execute(f.BuildContext context,
    {Map<String, dynamic>? arguments}) {
  return f.showDialog(
      context: context,
      barrierDismissible: barrierDismissible,
      builder: (context) {
        return f.AlertDialog(
          icon: const f.Icon(f.Icons.warning_amber_rounded),
          title: f.Text(title ?? ''),
          content: f.Text(message),
          actions: [
            for (final action in actions)
              f.ElevatedButton(
                onPressed: () {
                  action.action?.execute(context);
                },
                child: f.Text(action.title),
              ),
          ],
        );
      });
}