auto_suggestion_text_field 0.1.1
auto_suggestion_text_field: ^0.1.1 copied to clipboard

Flutter Android iOS Linux macOS web Windows

Auto Suggestion TextField with support for customization. it can be use on iOS and android.

example/main.dart

import 'package:flutter/material.dart';
import 'package:auto_suggestion_text_field/model/text_field_prop.dart';
import 'package:auto_suggestion_text_field/suggestion_text_field.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Auto Suggest',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Auto Suggest TextField'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final _dummySuggestionNames = [
    "Shantae Zook",
    "Sandie Curtis",
    "Kary Janssen",
    "Millard Murray",
    "Rocio Golightly",
    "Cesar Davi",
    "Trinh Eurich",
    "Bethel Roney",
    "Harland Bridgewater",
    "Camie Behr",
    "Cleo Bruck",
    "Alexandra Burgoyne",
    "Debora Crossett",
    "Latina Drye",
    "Palma Guillen",
    "Trenton Burgo",
    "Frankie Sifford",
    "Charley Carboni",
    "Dannielle Pietila",
    "Jenni Hardrick"
  ];

  @override
  Widget build(BuildContext context) {
    final props = TextFieldProperties(
      data: _dummySuggestionNames,
      hint: "Jesse",
      fieldHeight: 90,
      error: "No matching name available",
      onValueSelect: (value) => onSuggestionSelected(value),
    );

    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: SuggestionTextField(props: props),
      ),
    );
  }

  onSuggestionSelected(String value) => print("Value selected is: $value");
}
1
likes
80
pub points
27%
popularity

Auto Suggestion TextField with support for customization. it can be use on iOS and android.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

stupidravi2009@gmail.com

License

MIT (LICENSE)

Dependencies

flutter, rxdart

More

Packages that depend on auto_suggestion_text_field