standard_searchbar 2.0.0 standard_searchbar: ^2.0.0 copied to clipboard
A simple and very customizable search bar widget for Flutter.
import 'package:flutter/material.dart';
import 'package:standard_searchbar/standard_searchbar.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Standard SearchBar Example'),
),
body: const SizedBox(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(height: 50),
StandardSearchBar(
width: 360,
suggestions: [
'apple',
'banana',
'melon',
'orange',
'pineapple',
'strawberry',
'watermelon'
],
),
SizedBox(height: 200),
],
),
),
// backgroundColor: Colors.black12,
backgroundColor: const Color(0xFF12202F),
),
);
}
}