suggestion_input_field 0.0.1
suggestion_input_field: ^0.0.1 copied to clipboard
This is a suggestion text field
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(() {
});
},
);