imageProviderFor static method
Resolves url to an ImageProvider.
Uses the nearest BankUiScopeData.imageResolver when one is set; otherwise, or when no BankUiScope ancestor exists, falls back to NetworkImage. Registers an inherited dependency, so callers rebuild when the scope data (including the resolver) changes.
Implementation
static ImageProvider imageProviderFor(BuildContext context, String url) {
final inherited =
context.dependOnInheritedWidgetOfExactType<_BankUiScopeInherited>();
final resolver = inherited?.data.imageResolver;
return resolver != null ? resolver(url) : NetworkImage(url);
}