build method

  1. @override
Widget build(
  1. BuildContext context,
  2. HintActionText content
)
override

Builds the layout for the content item. This transforms the content into a Flutter Widget.

Implementation

@override
Widget build(BuildContext context, HintActionText content) {
  return HintAction(
    onTap: (_) => content.action?.execute(context),
    hintLabel: HintAction.defaultHintLabel(context, content.hint),
    actionLabel: content.action == null
        ? const SizedBox.shrink()
        : HintAction.defaultActionLabel(context, content.action!.title ?? ''),
    alignment: content.alignment.wrapAlignment,
  );
}