'How to refresh a FutureBuilder in stateless widget
I'm using provider as a state management solution and I want a way to refresh the FutureBuilder without setState
Solution 1:[1]
if you using provider use StreamProvider instead of FutureBuilder
StreamProvider<List<AuthInfo>>.value(
value: myDatabase.authInfosDao.watch(),
initialData: [],
child: Consumer<List<AuthInfo>>(builder: (context, data, _) {
},);
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | harsha.kuruwita |