toWidget method

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

Return the associated Widget

Implementation

@override
Widget toWidget(BuildContext context) => ListTile(
      key: id == null ? null : Key(id!),
      title: Text(caption ?? '<NO-TITLE>'),
      subtitle: subCaption == null ? null : Text(subCaption!),
      leading: leading?.toWidget(context) ?? toIcon(iconLeft, size: 48),
      trailing: trailing?.toWidget(context) ?? toIcon(iconRight, size: 48),
      contentPadding: padding == null ? null : EdgeInsets.all(padding!),
      onTap: () {
        action
            .execute(context, null)
            .then((value) => action.handleResult(context, value));
      },
    );