searchfield 0.7.4 searchfield: ^0.7.4 copied to clipboard
A highly customizable, simple and easy to use flutter Widget to add a searchfield to your Flutter Application. This Widget allows you to search and select from list of suggestions.
import 'package:example/dynamic_suggestions.dart.dart';
import 'package:example/demo.dart';
import 'package:example/country_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',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: ExampleList());
}
}
class ExampleList extends StatelessWidget {
const ExampleList({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('SearchField Demo')),
body: Column(
children: [
ListTile(
title: Text('Demo App'),
onTap: () {
Navigator.of(context)
.push(MaterialPageRoute(builder: (_) => DemoApp()));
},
),
ListTile(
title: Text('Country Search'),
onTap: () {
Navigator.of(context).push(MaterialPageRoute(
builder: (_) => CountrySearch(
title: 'Country List',
)));
},
),
ListTile(
title: Text('Dynamic sample'),
onTap: () {
Navigator.of(context)
.push(MaterialPageRoute(builder: (_) => DynamicSample()));
},
),
],
));
}
}