DataDisplayBuilder<T>.custom constructor

const DataDisplayBuilder<T>.custom({
  1. required Widget builder(
    1. BuildContext context,
    2. T data,
    3. void delete()
    ),
})

A custom widget builder that can be used to display a piece of data.

This builder will create a widget with the following properties:

  • builder is a function that takes the following parameters:
    • context is the build context of the widget.
    • data is the data that should be displayed.
    • delete is a function that should be called when the delete button is pressed.

The returned widget will be used to display the data.

See DataDisplayBuilderString for a pre-defined string builder.

Implementation

const factory DataDisplayBuilder.custom({
  required Widget Function(
    BuildContext context,
    T data,
    void Function() delete,
  )
  builder,
}) = DataDisplayBuilderWidget;