flutter 父子组件数据流和回调

20 阅读1分钟

父子组件数据流和回调 Demo演示:

  1. 父组件向子组件传递数据(通过构造函数参数)

  2. 子组件通过回调函数向父组件传递数据

image.png