問題タブ [cubit]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
flutter - Flutter cubit ブロックプロバイダーが正しいプロバイダーを見つけられませんでした
ユーザーがGoogleアカウントでサインインできるフラッターアプリを構築しています。これをcubitで管理したいです。Blocprovider を使用して、ウィジェット ツリーにキュビットを提供します。ブロックプロバイダーは、runApp 関数の futurebuilder 内にあります。ここに私のコードがあります:
main.dart:
SignInPage ウィジェット:
Google ボタン ウィジェット:
推奨されることを実行して、BlocProvider を Provider と交換しようとしたため、コードは次のようになります。
しかし、その後、引数の型 'SignInPage Function(BuildContext)' をパラメーターの型 'Widget Function(BuildContext, Widget)' に割り当てることはできませんというエラーが表示されます。