Relative Content

Tag Archive for flutterriverpod

Why i cant invalidate multiple async provider?

@Riverpod(keepAlive: true) Future<HomePageData> homeData(HomeDataRef ref) async { final data = await Future.wait([ ref.watch(walletBalanceProvider.future), ref.watch(marketTokensProvider.future), ref.watch(tokenChangesProvider.future), ref.watch(otcPairProvider.future), ]); return HomePageData( wallets: data[0] as List<Wallet>, marketTokens: data[1] as List<Token>, otcToken: data[2] as List<Token>, otcPair: data[3] as List<OtcPair>, ); } i have homeDataProvider like this, why when i call ref.invalidate(homeDataProvider) it will return error, but invalidating it one […]

Flutter Riverpod and HTTP: API Integration in Stepper Screen

I aim to integrate an API into the stepper screens, specifically within the dbs_screen.dart file. This file currently displays a greeting message and a start button. Upon pressing the start button, the current screen will be replaced with a series of form screens. My objective is to integrate the API across all forms, ensuring seamless data handling, validation, and submission processes until the final page, where the form will be submitted.