suggestion_input_field 0.0.2
suggestion_input_field: ^0.0.2 copied to clipboard
Suggestion_input_field is a Flutter package that provides a customizable input field with suggestions for faster and more accurate user input. It is ideal for forms, search bars, and any other input s [...]
SuggestionTextField #
SuggestionTextField is a Flutter package that provides a text field with auto-suggestion feature. It's useful for scenarios where users need to input data from a predefined list.
Installation #
To use this package, add suggestion_input_field as a dependency in your pubspec.yaml file.
Usage #
Simply import the package and use the SuggestionTextField widget in your Flutter app. Here is an example:
import 'package:suggestion_input_field/suggestion_input_field.dart';
List<MapEntry> list=[];
MapEntry? mapEntry;
SuggestionTextField<MapEntry>(
value: mapEntry,
textFieldContent: TextFieldContent(
label: 'Map Entry Details',
),
suggestionFetch:(textEditingValue) async{
return list;
},
onClose: () {
mapEntry=null;
setState(() {
});
},
);