I am creating an app that uses
I'm stumped since it would have worked in earlier versions I think. Thanks for the responses. Please let me know if I must include more code.
EDIT*: I have tried using FileImage
instead of AssetImage
and get a different cast type error:
The argument type 'PlatformFile?' can't be assigned to the parameter type 'File'.
CodePudding user response:
the problem is that you're using AssetImage
, which reads images from your code and not the Device's storage. you should be using FileImage
:
image: DecorationImage(
fit: BoxFit.cover,
image: FileImage(image),
),