dispose method

  1. @override
void dispose()
override

Be aware that the method will do nothing when keepScrollOffset is true. 注意当 keepScrollOffset 为 true 时方法不会进行释放。

Implementation

@override
void dispose() {
  // Skip delegate's dispose when it's keeping scroll offset.
  if (keepScrollOffset) {
    return;
  }
  provider.dispose();
  super.dispose();
}