search_bar_bloc

Creator: coderz1093

Last updated:

0 purchases

search_bar_bloc Image
search_bar_bloc Images
Add to Cart

Description:

search bar bloc

SearchBar with Bloc
This package a SearchBar with Bloc state management.
The purpose of this package is to give an easy way to implement a search bar in a stateless widget.
Features #
The composition of the search bar is customizable and more parameters will be handled in the future.
Getting started #
If you're not familiar with bloc state management and the flutter_bloc package here are the resources you need :

flutter_bloc
bloc
equatable

Usage #
Here is a quick example of how to implement the search bar with a BlocProvider.
@override
Widget build(BuildContext context) {
return BlocProvider(
create: (_) => SearchBarCubit(),
child: Column(
children: [
const SearchBar(hintText: "Search something..."),
BlocBuilder<SearchBarCubit, SearchBarState>(
buildWhen: (previous, current) => previous.content != current.content,
builder: (context, state) {
return Text("You are searching : ${state.content}");
}),
],
),
);
}
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator