Code snippet A is working, but not snippet B. I check variable "image"s data type with print(), both A and B's image (variable) has a datatype (XFile), not a Null. But B is still not working....
final XFile? image = await _picker.pickImage(source: ImageSource.gallery);
print(image);
// Code snippet A
if (image == null) return null;
return File(image.path);
// Code snippet B
return File(image!.path);