fix bug when after search button "To top" is shown when list was already at top
This commit is contained in:
parent
95ada5e1a7
commit
0d40fa5045
@ -91,12 +91,14 @@ class _BodyState extends State<Body> {
|
||||
placeholder: context.locale.search,
|
||||
controller: searchController,
|
||||
onChanged: (search) {
|
||||
context
|
||||
.read<HomeBloc>()
|
||||
.add(HomeShowButtonToTopEvent(isShown: false));
|
||||
Debounce.run(() => context
|
||||
.read<HomeBloc>()
|
||||
.add(HomeLoadDataEvent(search: search)));
|
||||
Debounce.run(() {
|
||||
context
|
||||
.read<HomeBloc>()
|
||||
.add(HomeShowButtonToTopEvent(isShown: false));
|
||||
context
|
||||
.read<HomeBloc>()
|
||||
.add(HomeLoadDataEvent(search: search));
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user