Error: Type ‘Completer’ not found. Error in latest flutter version : Flutter 1.17.0 • channel stable

Posted by

Error:

lib/main.dart:25:8: Error: Type 'Completer' not found.
 final Completer<WebViewController> _controller = Completer<WebViewController>();
       ^^^^^^^^^
lib/main.dart:25:8: Error: 'Completer' isn't a type.
 final Completer<WebViewController> _controller = Completer<WebViewController>();
       ^^^^^^^^^
lib/main.dart:25:51: Error: Method not found: 'Completer'.
 final Completer<WebViewController> _controller = Completer<WebViewController>();
                                                  ^^^^^^^^^

Sulotion:

It is evident from the error message that the Completer class cannot be located. Since this class is a component of the dart:async library, import it first in your Dart file:

import 'dart:async';

A version mismatch between your Flutter SDK and the dart:async library may be the cause of the problem if you have already imported dart:async. Try updating to the most recent version of the Flutter SDK:

flutter upgrade

Then, try running your project again:

flutter run
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x