useDidUpdate<W extends Widget> function
void
useDidUpdate<W extends Widget>(
- void fun(
- W oldWidget
- W widget
当 Widget 发生更新时执行,此 hook 会传递旧 Widget 实例
Implementation
void useDidUpdate<W extends Widget>(void Function(W oldWidget) fun, W widget) {
use(_Hook(fun, widget));
}