Is there a way to load images in Flutter in a function without access to a BuildContext?
Flutter can preload images with precacheImage() which requires a BuildContext and is inconvenient to use.
I would like to load images in the initState() method of a StatefulWidget which precacheImage() does not support.
There is an open issue about preloading images that suggests loading images without a BuildContext is not currently supported.