Skip to content

Bloc7 Q

Q:

問題1: 在這段程式碼中,context.watch() 的作用是什麼?

問題2: BlocBuilder 的作用是什麼?

問題3: context.read().add(2) 和 context.read().add(-1) 的作用是什麼?

問題4: 為什麼在 ElevatedButton 的 onPressed 屬性中使用 context.read().add(2) 和 context.read().add(-1)?

問題5: 為什麼在 Text 小部件中使用 ‘\({counterBloc.state}' 和 '\)state’?


Last update : 13 novembre 2024
Created : 13 novembre 2024

Comments

Comments