flutter_dropdown_search 0.0.1
flutter_dropdown_search: ^0.0.1 copied to clipboard
A Flutter package that an item can be searched from dropdown item lists
0.0.1 #
By this package you can search an item from the dropdown item list. And also can get the input from TextField that not present in the dropdown items.
Platforms #
This widget has been successfully tested on iOS, Android and Chrome.
Examples #
example project available in the repository.
Code #
Plugin usage Add to your pubspec.yaml in the dependencies section:
searchable_dropdown: Get packages with command:
flutter packages get Import:
import 'package:src/flutter_dropdown_search.dart';
Examples #
Example image-1<\a>
Example image-2<\a>
import 'package:src/flutter_dropdown_search.dart'; import 'package:flutter/material.dart';
void main() { runApp(MyApp()); }
class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Dropdown Search', theme: ThemeData( primarySwatch: Colors.blue, ), home: HomePage() ); } }
class HomePage extends StatelessWidget { TextEditingController _controller=TextEditingController(); List
@override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text('Flutter Dropdown Search'), ), body: Padding( padding: EdgeInsets.symmetric(horizontal: 15,vertical: 20), child: Column( children: [ FlutterDropdownSearch( textController: _controller, items: items, dropdownHeight: 300, ) ], ), ), ); } }