toWidget method

  1. @override
Widget toWidget(
  1. BuildContext context
)
override

Return the associated Widget

Implementation

@override
Widget toWidget(BuildContext context) => IconButton(
      key: id == null ? null : Key(id!),
      iconSize: size ?? 24.0,
      icon: icon == null ? const Icon(Icons.warning) : toIcon(icon)!,
      color: toColor(color),
      tooltip: tooltip,
      onPressed: () => action
          .execute(context, null)
          .then((value) => action.handleResult(context, value)),
    );