Skip to content
pubscout

field_suggestion

0.2.6, released 2 years ago by theiskaa.com

Create customizable and controllable autocomplete fields in Flutter.

WASM-ready
$ flutter pub add field_suggestion
Source repository

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.

  • pin_code_fields

    A customizable PIN and OTP input field widget for Flutter with headless core and Material support.

  • dropdown_search

    A simple, reactive, and highly customizable Flutter dropdown with search and multi-mode support.

  • otp_text_field

    A Flutter widget to create customizable OTP and PIN input fields.

Works with

Packages commonly used together with field_suggestion: ones it builds on, ones built on it, and its own family.