4

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

Javeed Ishaq
  • 6,024
  • 6
  • 41
  • 60

1 Answers1

12

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

FutureOr is part of dart:async

Sachin Bhankhar
  • 900
  • 8
  • 14