From f5256caec810f167e13bb8aaa6793b7e69fa9c22 Mon Sep 17 00:00:00 2001 From: codedraughtsman Date: Tue, 5 May 2020 19:03:17 +1200 Subject: [PATCH] added a reload method to the BLOC --- lib/src/bloc_select.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/src/bloc_select.dart b/lib/src/bloc_select.dart index e8ba0da..b32a70a 100644 --- a/lib/src/bloc_select.dart +++ b/lib/src/bloc_select.dart @@ -111,6 +111,13 @@ class SelectBloc { } } + //A way to externally trigger the BLOC to rerun the query. + //Very useful if you have a changing filter being used as part of the + //search query. + Future reload() async { + return _getItems(); + } + Future _getItems() async { List> res;