input_box_with_suggestion 0.0.2 copy "input_box_with_suggestion: ^0.0.2" to clipboard
input_box_with_suggestion: ^0.0.2 copied to clipboard

A new Flutter project.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:input_box_with_suggestion/input_box_with_suggestion.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => MyAppState();
}

class MyAppState extends State<MyApp> {
  Set<String> dataSource = {
    "Apple",
    "OnePlus",
    "Motorola",
    "Micromax",
    "Samsung"
  };

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      home: SafeArea(
        child: Scaffold(
          backgroundColor: Colors.white,
          body: Column(
            children: [
              InputBoxWithSuggestion(
                inputBoxBgColor: Colors.red,
                suffixIcon: Icons.search,
                suffixIconColor: Colors.grey,
                textFormFieldHint: "Search..",
                textFormFieldFillColor: Colors.white,
                textFormFieldFocusedBorderSideColor: Colors.grey,
                textFormFieldEnabledBorderSideColor: Colors.grey,
                suggestionViewBgColor: Colors.white,
                suggestionViewSuffixIcon: Icons.trending_up,
                suggestionViewSuffixIconColor: Colors.grey,
                suggestionViewPreffixIcon: Icons.close,
                suggestionViewPreffixIconColor: Colors.grey,
                dataSource: dataSource,
                onItemSelected: (index, item) {
                  // print("${index} : ${item}");
                },
                onItemSearched: (value) {
                  // print({value});
                },
              )
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
110
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter project.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on input_box_with_suggestion