separatorBuilder property

(Widget Function(BuildContext, int)?) separatorBuilder
final

The builder function that creates separators for the suggestion list.

This function takes a BuildContext and an index as arguments, and returns a separator widget that will be displayed between each suggestion widget. The index corresponds to the position of the suggestion in the suggestions list.

This property is similar to the ListView.seperated but as property.

Example usage:

FieldSuggestion(
  separatorBuilder: (context, index) {
    return const Divider();
  },
  ...
)

Implementation

final Widget Function(BuildContext, int)? separatorBuilder;