animation_search_bar
Flutter 动画搜索栏包
- 星标
- 20
- 复刻
- 8
- 最近推送(UTC)
- 2024年5月1日
- 项目状态
- 未归档
原始 README
以下为英文项目原文快照,最新内容请访问 GitHub。
animation_search_bar
A Customizable Animated Search Bar. It is suitable for the AppBar.
Getting Started
Simple use case
AnimationSearchBar(
backIconColor: Colors.black,
centerTitle: 'App Title',
onChanged: (text) => debugPrint(text),
searchTextEditingController: controller,
horizontalPadding: 5)
| Simple use case | Using all properties |
|---|---|
![]() |
![]() |
All properties of this package
AnimationSearchBar(
///! Required
onChanged: (text) => debugPrint(text),
searchTextEditingController: controller,
///! Optional. For more customization
//? Back Button
backIcon: Icons.arrow_back_ios_new,
backIconColor: Colors.white,
isBackButtonVisible: true,
previousScreen: null, // It will push and replace this screen when pressing the back button
//? Close Button
closeIconColor: Colors.white,
//? Center Title
centerTitle: 'App Title',
hintText: 'Search here...',
centerTitleStyle: const TextStyle(
fontWeight: FontWeight.w500,color: Colors.white, fontSize: 20),
//? Search hint text
hintStyle: const TextStyle(
color: Colors.white, fontWeight: FontWeight.w300),
//? Search Text
textStyle: const TextStyle(
color: Colors.white, fontWeight: FontWeight.w300),
//? Cursor color
cursorColor: Colors.lightBlue.shade300,
//? Duration
duration: const Duration(milliseconds: 500),
//? Height, Width & Padding
searchFieldHeight: 35, // Total height of the search field
searchBarHeight: 50, // Total height of this Widget
searchBarWidth: MediaQuery.of(context).size.width - 20, // Total width of this Widget
horizontalPadding: 5,
verticalPadding: 0,
//? Search icon color
searchIconColor: Colors.white.withOpacity(.7),
//? Search field background decoration
searchFieldDecoration: BoxDecoration(
color: Colors.blueGrey.shade700,
border: Border.all(color: Colors.black.withOpacity(.2), width: .5),
borderRadius: BorderRadius.circular(15)),
)
Background Color
If you want to customize the background color. Please see the example where I decorate a Container for the search bar background. you can decorate as your wish.
语言C++DartCMakeHTMLCSwiftKotlinObjective-C
分类
使用的依赖
依赖清单 4 项
- flutter
{"sdk":"flutter"} - flutter_riverpod
^2.1.1 - flutter_test开发依赖
{"sdk":"flutter"} - flutter_lints开发依赖
^1.0.0
如何选择适合项目的代码仓?
先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。
- 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
- 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
- 使用前在 GitHub 核对 README、许可证与 Issues。
来源与维护
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗

