Flutter The name FutureOr isn't a type, so it can't be used in an as expression

686

Looks like import is missing import 'dart:async';

FutureOr is part of dart:async

Share:
686
Javeed Ishaq
Author by

Javeed Ishaq

I am a passionate Software Developer, I love to build mobile apps. My expertise is Flutter, Android, Kotlin, Jetpack Compose, and Firebase.

Updated on December 30, 2022

Comments

  • Javeed Ishaq
    Javeed Ishaq over 1 year

    While upgrading the flutter project to null-safety it has appeared the following error

        The name 'FutureOr' isn't a type, so it can't be used in an 'as' expression.
    Try changing the name to the name of an existing type, or creating a type with the name 'FutureOr'
    

    enter image description here