skip to Main Content

Launching libmain.dart on sdk gphone x86 in debug mode…
Running Gradle task ‘assembleDebug’…
../flutter/.pub-cache/hosted/pub.dartlang.org/fluttertoast-8.1.3/lib/fluttertoast.dart:165:28: Error: Member not found: ‘Overlay.maybeOf’.
var _overlay = Overlay.maybeOf(context!);
^^^^^^^](https://i.stack.imgur.com/LFZTA.png)

I changed fluttertoast version but I got the same error above.

2

Answers


  1. Flutter toast v8.1.3 cannot work with a Flutter version older than 3.7.0 because of a breaking change in Flutter v3.7.0. You have to either use fluttertoast v8.1.2 or you have to upgrade your flutter version to v3.7.0+.

    Login or Signup to reply.
  2. Please check your pubspec.lock File & Make sure you have same version in both pubspec.lock & pubspec.yaml

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search