ImageExtension constructor
ImageExtension({
- AssetBundle? assetBundle,
- String? assetPackage,
- String assetSchema = "asset:",
- String? dataEncoding,
- Set<
String> ? fileExtensions, - Set<
String> ? mimeTypes, - Set<
String> ? networkDomains, - Map<
String, String> ? networkHeaders, - Set<
String> networkSchemas = const {"http", "https"}, - bool handleAssetImages = true,
- bool handleDataImages = true,
- bool handleNetworkImages = true,
- Widget? child,
- Widget builder()?,
ImageExtension allows you to extend the built-in support by
providing a custom way to render a specific selection of attributes
or providing headers or asset package/bundle specifications.
Implementation
ImageExtension({
super.assetBundle,
super.assetPackage,
super.assetSchema = "asset:",
super.dataEncoding,
super.fileExtensions,
super.mimeTypes,
super.networkDomains,
super.networkHeaders,
super.networkSchemas = const {"http", "https"},
super.handleAssetImages = true,
super.handleDataImages = true,
super.handleNetworkImages = true,
Widget? child,
Widget Function(ExtensionContext)? builder,
}) {
if (child != null) {
this.builder = (_) => WidgetSpan(child: child);
} else {
this.builder = (context) => WidgetSpan(child: builder!.call(context));
}
}