-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第5章の実装 #5
base: main
Are you sure you want to change the base?
Conversation
@FlutterKaigi/conference-handson-2023 |
あるとGoodですね
文字切れの対応をどうするか考えると、上の文言だけIDでもいいかもっす。(このままでもGood)
StreamProviderでいいと思います。
Playersは4章にもあっていいかなと思いますよ! |
Deploying with
|
Latest commit: |
69445f2
|
Status: | ✅ Deploy successful! |
Preview URL: | https://b6d60f4f.tic-tac-toe-handson.pages.dev |
Branch Preview URL: | https://chapter5.tic-tac-toe-handson.pages.dev |
FlutterKaigi からプロジェクトを新しく作ったので、ご確認いただけると🙏 |
@okaryo cc: @FlutterKaigi/conference-handson-2023 諸々ご対応いただき、ありがとうございます mm 5章はマージとのことだったかと思いますが、まだ conflict あるようなので、こちらも解消いただけますと🙏 |
概要
詳細
${playerA}_${playerB}
として、盤上の状態をStreamを使って購読していますPlayers
というクラスを新たに作成し、対戦相手同士の名前を保持するようにしていますStateNotifierProvider
からStateProvider
を使うように変更していますUI
Screen.Recording.2023-09-23.at.14.44.16.mov
対戦までの流れ
tic_tac_toe_provider.dart
の指定の箇所に記入する。相談内容
StateNotifierProvider
からStateProvider
を使うように変更しましたがどうでしょうか?Players
というクラスを作成し、playerX
,playerO
というフィールドで手番を扱うようにしましたが他に良いアイデアあればくださいmmPlayers
クラスは第4章時点で実装しておいても良さそうに思いましたがいかがでしょうか?備考