auto_search 1.0.6 auto_search: ^1.0.6 copied to clipboard
A simple Auto Search Text Field to spice up your projects. This package would help incorporate such a feature with ease.
import 'package:auto_search/auto_search.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
home: Scaffold(
body: HomePage(),
),
);
}
}
class HomePage extends StatelessWidget {
final List<String> names = [
"Ayden Ram",
"Rowan Trevon",
"Garrison Faisal",
"Bridie Ford",
"Rameel Xavier",
"Abriel Yestin",
"Cal Heston",
"Ryland Nick",
"Orson Kaylen",
];
@override
Widget build(BuildContext context) {
return Container(
padding: const EdgeInsets.all(20.0),
child: AutoSearchInput(
data: names,
maxElementsToDisplay: 10,
onItemTap: (index) {},
),
);
}
}