SuggestionOverlayBuilder constructor

const SuggestionOverlayBuilder({
  1. required Widget builder(
    1. BuildContext context,
    2. TextEditingController controller,
    3. VoidCallback onTap
    ),
  2. required List<String> items,
  3. void onDeleteSuggestion(
    1. String value
    )?,
  4. double maxHeight = 260,
  5. Color? color,
  6. Color? backgroundColor,
  7. double elevation = 8.0,
  8. TextEditingController? controller,
  9. VoidCallback? onTap,
  10. bool showOnTap = true,
})

Widget to enable the suggest feature and autocomplete feature.

items: Source list for suggestion. controller: Text editing controller. onTap: Processing when tapping a child element (text field). elevation: Suggest window height. backgroundColor: Background color of suggestion window. onDeleteSuggestion: What to do if the suggestion is deleted. color: Suggestion window text color. builder: Builder for child elements. showOnTap: True to show suggestions when tapping the element. maxHeight: Maximum height of choices.

Implementation

const SuggestionOverlayBuilder(
    {required this.builder,
    required this.items,
    this.onDeleteSuggestion,
    this.maxHeight = 260,
    this.color,
    this.backgroundColor,
    this.elevation = 8.0,
    this.controller,
    this.onTap,
    this.showOnTap = true});