useDidUpdate<W extends Widget> function

void useDidUpdate<W extends Widget>(
  1. void fun(
    1. W oldWidget
    ),
  2. W widget
)

当 Widget 发生更新时执行,此 hook 会传递旧 Widget 实例

Implementation

void useDidUpdate<W extends Widget>(void Function(W oldWidget) fun, W widget) {
  use(_Hook(fun, widget));
}