ImageExtension.inline constructor
ImageExtension.inline({
- 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,
- InlineSpan? child,
- InlineSpan builder()?,
See ImageExtension. The only difference is that this method allows you
to directly pass an InlineSpan through child or builder, allowing you
to construct more seamless extensions.
Implementation
ImageExtension.inline({
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,
InlineSpan? child,
InlineSpan Function(ExtensionContext)? builder,
}) : assert((child != null) || (builder != null),
"Either child or builder needs to be provided to ImageExtension.inline") {
if (child != null) {
this.builder = (_) => child;
} else {
this.builder = builder!;
}
}