How do I show a different image if a _readProfile is null
I tried the picture above and it is erroring out
You need to create a method with return Widget
.
And it will work as below
Widget getImage() {
if (_readProfile != null) {
return Image.network('YOUR LINK');
} else {
return Image.asset('URL FROM ASSET FOLDER');
}
}
Then you just need to call this method
Container(
child: getImage(),
)
It will work for you.