Search code examples
flutterdartdart-null-safety

A value of type 'Image' can't be assigned to a variable of type 'Image?'


This so ridiculous, why I wouldn't be able to assign a non null-able value to a null-able variable?

is it a null safety problem or something else?

Thank you.


Solution

  • This is not a null-safety problem, left side type is an Image? from library : 'dart:ui' and right side type is an Image from package:'package:flutter/widgets.dart'