Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: The method 'ancestorRenderObjectOfType' isn't defined for the class #14

Open
angadiumakant opened this issue Mar 10, 2021 · 6 comments

Comments

@angadiumakant
Copy link

Hi i have just updated flutter version to 2.0 .

I am getting error as below.

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/floating_search_bar-0.3.0/lib/ui/sliver_search_bar.dart:242:20: Error: The method 'ancestorRenderObjectOfType' isn't defined for the class 'BuildContext'.

  • 'BuildContext' is from 'package:flutter/src/widgets/framework.dart' ('/C:/src/flutter/packages/flutter/lib/src/widgets/framework.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'ancestorRenderObjectOfType'.
    return context.ancestorRenderObjectOfType(
    ^^^^^^^^^^^^^^^^^^^^^^^^^^

Can anyone give me solution for this

@brumbrumm
Copy link

Pull request was created for the issue

#13

@rodydavis
Copy link
Owner

Thank you! I am migrating all my packages to null safe. so i will make sure this PR is a part of it. Thank you @brumbrumm

@brumbrumm
Copy link

@rodydavis you're welcome.

@bohrasankalp
Copy link

When the PR will be merged?

@rodydavis
Copy link
Owner

Soon, but there are a lot of packages in migrating. You can always override a package from a git url of a specific branch in the meantime

@rodydavis rodydavis transferred this issue from rodydavis/plugins Mar 31, 2021
@shunia
Copy link

shunia commented Apr 22, 2021

Soon, but there are a lot of packages in migrating. You can always override a package from a git url of a specific branch in the meantime

The right way to override a package from a git url of a specific branch:

floating_search_bar:
    git:
      url: https://github.com/brumbrumm/floating_search_bar.git
      ref: 3527d04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants