FastSearchAppBar constructor
FastSearchAppBar({})
FastSearchAppBar is a widget that implements a search bar in the app bar.
onSearch
is a callback that returns the search value.
debounceTime
is the time in milliseconds to wait before calling the onSearch
callback.
title
is the title of the app bar.
hint
is the hint text of the search bar.
loading
is a boolean that indicates if the search is loading.
animated
is a boolean that indicates if the search bar will be animated.
Example:
Scaffold(
Implementation
// appBar: FastSearchAppBar(
// title: "Fast UI Kit",
// onSearch: (v) {},
// ),
FastSearchAppBar({
super.key,
this.actions,
this.onSearch,
this.debounceTime,
required this.title,
this.hint,
this.loading,
this.animated = true,
}) : super(
child: _SearchAppBar(
actions: [...?actions],
onSearch: onSearch,
animated: animated,
debounceTime: debounceTime,
title: title,
hint: hint,
loading: loading,
),
preferredSize: Size(double.infinity,
loading == true ? kToolbarHeight + 5 : kToolbarHeight));