ImageExtension.inline constructor

ImageExtension.inline({
  1. AssetBundle? assetBundle,
  2. String? assetPackage,
  3. String assetSchema = "asset:",
  4. String? dataEncoding,
  5. Set<String>? fileExtensions,
  6. Set<String>? mimeTypes,
  7. Set<String>? networkDomains,
  8. Map<String, String>? networkHeaders,
  9. Set<String> networkSchemas = const {"http", "https"},
  10. bool handleAssetImages = true,
  11. bool handleDataImages = true,
  12. bool handleNetworkImages = true,
  13. InlineSpan? child,
  14. InlineSpan builder(
    1. ExtensionContext
    )?,
})

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!;
  }
}