Flutter doesn't recognize it's own widget named parameters after updating

1,436

In my case when this happens I just go to pubspec.yaml and I just press get packages and then I restart my editor. I don't know if this is the proper way to solve this but it works for me.

Share:
1,436
Isabela Castilho
Author by

Isabela Castilho

Updated on December 22, 2022

Comments

  • Isabela Castilho
    Isabela Castilho over 1 year

    I was developing a project on my laptop and moved to my desktop, so I got some errors. I updated flutter and after that, I get this warning:

        for (Offset center in scaleHandles) {
          handles.add(Rect.fromCircle(center: center, radius: r));
        }
    

    "The named parameter 'center' isn't defined. Try correcting the name to an existing named parameter's name, or defining a named parameter with the name 'center'.dartundefined_named_parameter" When I hover over "fromCircle" I get this tip "Rect Rect.fromCircle({dynamic Offset})". That doesn't make any sense! The official docs also state that a Rect from a circle takes CENTER and RADIUS. What's going on????

    • This is my flutter version: G:>flutter doctor --version Flutter 1.19.0-4.3.pre • channel beta • https://github.com/flutter/flutter.git Framework • revision 8fe7655ed2 (3 weeks ago) • 2020-07-01 14:31:18 -0700 Engine • revision 9a28c3bcf4 Tools • Dart 2.9.0 (build 2.9.0-14.1.beta)

    • Before I updated to flutter beta, this is the error I got: Running "flutter pub get" in spirals_app...
      Because every version of flutter_test from sdk depends on path 1.6.4 and spirals_app depends on path ^1.7.0, flutter_test from sdk is forbidden. So, because spirals_app depends on flutter_test any from sdk, version solving failed. pub get failed (1; So, because spirals_app depends on flutter_test any from sdk, version solving failed.) exit code 1

    enter image description here

  • Isabela Castilho
    Isabela Castilho over 3 years
    It worked! Thank you! It just had never happened before so I got a little desperate and forgot to even try that...