Why myImageProvider has the type of Object, but not ImageProvider.
I know I can use if-else clause, just curious about how auto-casting works.
final myImageProvider = (debugAssetPath != null)
? AssetImage(debugAssetPath!)
: FileImage(File(capturedImagePath));
Thank you.