flutter_page_tracker icon indicating copy to clipboard operation
flutter_page_tracker copied to clipboard

升级为flutter2.2.3报如下错误

Open hmTest6 opened this issue 4 years ago • 0 comments

../../../flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_tracker-3.0.7/lib/src/page_view_listener_mixin.dart:106:20: Error: The method 'ancestorStateOfType' isn't defined for the class 'BuildContext'.

  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../../flutter/packages/flutter/lib/src/widgets/framework.dart'). Try correcting the name to the name of an existing method, or defining a method named 'ancestorStateOfType'. return context.ancestorStateOfType(TypeMatcher<PageViewListenerWrapperState>()); ^^^^^^^^^^^^^^^^^^^ ../../../flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_tracker-3.0.7/lib/src/page_load_provider.dart:20:23: Error: The method 'inheritFromWidgetOfExactType' isn't defined for the class 'BuildContext'.
  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('../../../flutter/packages/flutter/lib/src/widgets/framework.dart').

Try correcting the name to the name of an existing method, or defining a method named 'inheritFromWidgetOfExactType'. return (context.inheritFromWidgetOfExactType( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

hmTest6 avatar Aug 04 '21 09:08 hmTest6