Skip to content

升级为flutter2.2.3报如下错误 #17

Description

@hmTest6

../../../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());
    ^^^^^^^^^^^^^^^^^^^
    ../../../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(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions