发布于2021年1月4日 由pzhangflutter findAncestorStateOfType错误 The method ‘findAncestorStateOfType’ was called on null. Receiver: null Tried calling: findAncestorStateOfType<NavigatorState>() 出现上述错误的情况是由一个对话框需要导航到另外一个页面出现的,最后修复了,是没有导入BuildContext所致。