app_bar_search 1.0.7
app_bar_search: ^1.0.7 copied to clipboard
A lightweight Flutter AppBar widget with integrated search and smooth animations.
app_bar_search #
A lightweight Flutter widget that provides an AppBar with built-in search functionality and
smooth animated transitions.
It is designed to be used directly as a replacement for the default AppBar.
Demo #
Features #
- Integrated search field inside AppBar
- Smooth title to search transition animations
- Implements PreferredSizeWidget for seamless Scaffold integration
- Search callbacks for filtering and submission
- External TextEditingController and FocusNode support
- Highly customizable appearance
- No external dependencies
Usage #
import 'package:flutter/material.dart';
import 'package:app_bar_search/app_bar_search.dart';
class MyPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBarSearch(
title: const Text('My App'),
hintText: 'Search...',
onChanged: (query) {
// Filter your data here
},
onSubmitted: (query) {
// Handle search submit
},
onClosed: () {
// Called when search is closed
},
),
body: Container(),
);
}
}