Currently I am refreshing a FutureProvider that is responsible for fetching data from Firebase and displaying it in a simple ListView with liquid_pull_to_refresh package, which causes the list to disappear, the loading indicator is shown again and in the end the list is shown again.
What I would like to achieve instead is to keep the list displayed and only update it after the fetching is complete. I am using Riverpod for state management.
The provider:
final userProfileProvider = FutureProvider.family<FullUserModel?, String?>((ref, value) => ref.read(databaseServiceProvider).getFullUserModel(value));
Refresh part:
LiquidPullToRefresh(
onRefresh: () async {
ref.refresh(userProfileProvider(uid));
},
child: ListView()
)
Is there any good approach for this?