rodydavis / floating_search_bar

Floating Search Bar like Gmail for Flutter
https://rodydavis.github.io/floating_search_bar/
MIT License
32 stars 27 forks source link

After updating flutter, it's causing dependency problems #15

Open luffy1012 opened 3 years ago

luffy1012 commented 3 years ago

So with latest stable channel of flutter it is giving following error on pub get command! /C:/src/flutter/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'.

I solved this by using flutter dev channel. But it is not working in stable channel! My configuration :

Flutter 2.0.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b1395592de (4 days ago) • 2021-04-01 14:25:01 -0700
Engine • revision 2dce47073a
Tools • Dart 2.12.2
vikivyas commented 3 years ago

Update sliver_search_bar.dart

replaced return context.findAncestorRenderObjectOfType(); from return context.ancestorRenderObjectOfType(const TypeMatcher());