field_suggestion
0.2.6, released 2 years ago by theiskaa.com
Create customizable and controllable autocomplete fields in Flutter.
What it does
Provides customizable input fields with suggestion capabilities, including network-driven suggestions via a FutureBuilder-like API. It allows developers to control the visibility of the suggestion box, provide custom input widgets, and use generic types for suggestions.
AI-written summary of version 0.2.6, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need an autocomplete input field with custom suggestion fetching (e.g., local or network searches).
- You want to customize how suggestions are displayed and filtered.
Skip it when
- You require a complex native-like search delegate spanning entire screens.
Strengths
- Supports custom search algorithms and generic typing.
- Provides a network constructor for asynchronous suggestion loading.
- Highly customizable UI components and box controllers.
Weaknesses
- Relies on external wiki documentation for detailed usage examples.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 1
FieldSuggestion<String>.network(
inputDecoration: InputDecoration(
hintText: 'Username',
),
future: (input) => future.call(input),
textController: controller,
boxController: boxController,
builder: (context, snapshot) {
if (snapshot.connectionState != ConnectionState.done) {
return Center(child: CircularProgressIndicator());
}
final result = snapshot.data ?? [];
return ListView.builder(
itemCount: result.length,
itemBuilder: (context, index) {
return ListTile(title: Text(result[index]));
},
);
},
)Alternatives
Packages that do the same job and could replace field_suggestion.
- searchfield
An autocomplete search widget with customizable suggestions, validation, and keyboard navigation.
79Compare - pin_code_fields
A customizable PIN and OTP input field widget for Flutter with headless core and Material support.
93Compare - dropdown_search
A simple, reactive, and highly customizable Flutter dropdown with search and multi-mode support.
87Compare - otp_text_field
A Flutter widget to create customizable OTP and PIN input fields.
75Compare
Works with
Packages commonly used together with field_suggestion: ones it builds on, ones built on it, and its own family.