flutter官方provider 使用技巧 Consumer 和 Selector 读取provider中的数据 通过context.watch、context.read、context.select实现: context.watch<T>(),使widget能够监听泛型T上发生的改变。 context.read<T>(),直接返回T,不会监听改变。 context.select<T, R>(R cb(T value)),允许widget只监听T上的一部分R。