緣由
Get Exception below:
Looking up a deactivated widget's ancestor is unsafe.
Solution:
To safely refer to a widget's ancestor in its dispose() method, save a reference to the ancestor by calling dependOnInheritedWidgetOfExactType() in the widget's didChangeDependencies() method.
Question: 有沒有 Linter 的規則可以幫忙檢查?