enough_html_editor library

API based HTML editor

Classes

AjaxRequest
Class that represents a JavaScript XMLHttpRequest object.
AjaxRequestAction
Class used by AjaxRequest class.
AjaxRequestEvent
Class used by AjaxRequest class. It represents events measuring progress of an AjaxRequest.
AjaxRequestEventType
Class used by AjaxRequestEvent class.
AjaxRequestHeaders
Class that represents the HTTP headers of an AjaxRequest.
AjaxRequestReadyState
Class used by AjaxRequest class. It represents the state of an AjaxRequest.
AlignDropdown
Controls the align format settings left, right, center and justify
AndroidActionModeMenuItem
An Android-specific class used to disable the action mode menu items.
AndroidCacheMode
An Android-specific class used to override the way the cache is used.
AndroidChromeCustomTabsOptions
This class represents all the Android-only ChromeSafariBrowser options available.
AndroidForceDark
An Android-specific class used to indicate the force dark mode.
AndroidInAppBrowserOptions
This class represents all the Android-only InAppBrowser options available.
AndroidInAppWebViewController
Class represents the Android controller that contains only android-specific methods for the WebView.
AndroidInAppWebViewOptions
This class represents all the Android-only WebView options available.
AndroidLayoutAlgorithm
An Android-specific class used to set the underlying layout algorithm.
AndroidLayoutInDisplayCutoutMode
Android-specific class representing the share state that should be applied to the custom tab.
AndroidMixedContentMode
An Android-specific class used to configure the WebView's behavior when a secure origin attempts to load a resource from an insecure origin.
AndroidOptions
AndroidOverScrollMode
An Android-specific class used to configure the WebView's over-scroll mode. Setting the over-scroll mode of a WebView will have an effect only if the WebView is capable of scrolling.
AndroidPullToRefreshSize
Android-specific class representing the size of the refresh indicator.
AndroidScrollBarStyle
An Android-specific class used to configure the style of the scrollbars. The scrollbars can be overlaid or inset. When inset, they add to the padding of the view. And the scrollbars can be drawn inside the padding area or on the edge of the view. For example, if a view has a background drawable and you want to draw the scrollbars inside the padding specified by the drawable, you can use AndroidScrollBarStyle.SCROLLBARS_INSIDE_OVERLAY or AndroidScrollBarStyle.SCROLLBARS_INSIDE_INSET. If you want them to appear at the edge of the view, ignoring the padding, then you can use AndroidScrollBarStyle.SCROLLBARS_OUTSIDE_OVERLAY or AndroidScrollBarStyle.SCROLLBARS_OUTSIDE_INSET.
AndroidServiceWorkerClient
Class that represents an Android-specific class for clients to capture Service Worker related callbacks.
AndroidServiceWorkerController
Class that represents an Android-specific class that manages Service Workers used by WebView.
AndroidSslError
Class that represents the Android-specific primary error associated to the server SSL certificate. Used by the ServerTrustChallenge class.
AndroidVerticalScrollbarPosition
An Android-specific class used to configure the position of the vertical scroll bar.
AndroidWebStorageManager
Class that is used to manage the JavaScript storage APIs provided by the WebView. It manages the Application Cache API, the Web SQL Database API and the HTML5 Web Storage API.
AndroidWebStorageOrigin
Class that encapsulates information about the amount of storage currently used by an origin for the JavaScript storage APIs. An origin comprises the host, scheme and port of a URI. See AndroidWebStorageManager for details.
AndroidWebViewFeature
Class that represents an Android-specific utility class for checking which WebView Support Library features are supported on the device.
AndroidWebViewPackageInfo
Class that represents an Android WebView package info.
Animation
Stores multiple images, most often as the frames of an animation.
ASN1DERDecoder
ASN1DEREncoder
ASN1DistinguishedNames
ASN1Identifier
ASN1IdentifierClass
ASN1IdentifierTagNumber
ASN1Object
AuthorityInfoAccess
AuthorityInfoAccessExtension
Recognition for Authority Info Access Extension (1.3.6.1.5.5.7.1.1)
AuthorityKeyIdentifierExtension
Recognition for Authority Key Identifier Extension (2.5.29.35)
BaseFormatButtons
Controls the base format settings bold, italic, underlined and strikethrough
BasicConstraintExtension
Recognition for Basic Constraint Extension (2.5.29.19)
BitmapFont
A bitmap font that can be used with drawString and drawChar functions. If you want use own fonts following with this steps: 1. Get your .ttf file - important is to select file with specific style which you want for example when you download .ttf file from google fonts: select file from /static folder example name: Roboto-Black.ttf 2. Convert ttf file to fnt zip with page: https://ttf2fnt.com/ 3. Create dart file with code: void main() { String fileName = 'YourFontName-Style.zip'; // your file has to be in the same folder as this program File file = File('$fileName'); List
BitmapFontCharacter
A single character in a BitmapFont.
BitUtility
BlockPicker
BmpDecoder
BmpEncoder
Encode a BMP image.
BrowserOptions
CallAsyncJavaScriptResult
Class that represents either a success or a failure, including an associated value in each case for InAppWebViewController.callAsyncJavaScript.
CertificatePoliciesExtension
Recognition for Certificate Policies Extension (2.5.29.32)
CertificatePolicy
CertificatePolicyQualifier
CheckerPainter
Painter for chess type alpha background in slider track widget.
ChromeSafariBrowser
This class uses native Chrome Custom Tabs on Android and SFSafariViewController on iOS.
ChromeSafariBrowserActionButton
Class that represents a custom action button for a ChromeSafariBrowser instance.
ChromeSafariBrowserClassOptions
Class that represents the options that can be used for an ChromeSafariBrowser window.
ChromeSafariBrowserMenuItem
Class that represents a custom menu item for a ChromeSafariBrowser instance.
ChromeSafariBrowserOptions
ClientCertChallenge
Class that represents the challenge of the WebView.onReceivedClientCertRequest event. It provides all the information about the challenge.
ClientCertResponse
Class that represents the response used by the WebView.onReceivedClientCertRequest event.
ClientCertResponseAction
Class used by ClientCertResponse class.
Color
Image pixel colors are instantiated as an int object rather than an instance of the Color class in order to reduce object allocations. Image pixels are stored in 32-bit RGBA format (8 bits per channel). Internally in dart, this will be stored in a "small integer" on 64-bit machines, or a "medium integer" on 32-bit machines. In Javascript, this will be stored in a 64-bit double.
ColorControls
Combines color pickers for text foreground and text background colors
ColorIndicator
Simple round color indicator.
ColorPicker
The default layout of Color Picker.
ColorPickerArea
Provide Rectangle & Circle 2 categories, 10 variations of palette widget.
ColorPickerControl
Simple picker widget for a single color
ColorPickerHueRing
Provide Hue Ring with HSV Rectangle of palette widget.
ColorPickerInput
Provide hex input wiget for 3/6/8 digits.
ColorPickerLabel
Provide label for color information.
ColorPickerSlider
9 track types for slider picker widget.
ColorSetting
Standard color settings
CompressFormat
Class that represents the known formats a bitmap can be compressed into.
ConsoleMessage
Class representing a JavaScript console message from WebCore. This could be a issued by a call to one of the console logging functions (e.g. console.log('...')) or a JavaScript error on the page.
ConsoleMessageLevel
Class representing the level of a console message.
ContentBlocker
Class that represents a set of rules to use block content in the browser window.
ContentBlockerAction
Action associated to the trigger. The action tells to the WebView what to do when the trigger is matched. When a trigger matches a resource, the browser queues the associated action for execution. The WebView evaluates all the triggers, it executes the actions in order. When a domain matches a trigger, all rules after the triggered rule that specify the same action are skipped. Group the rules with similar actions together to improve performance.
ContentBlockerActionType
Class that represents the kind of action that can be used with a ContentBlockerTrigger.
ContentBlockerTrigger
Trigger of the content blocker. The trigger tells to the WebView when to perform the corresponding action. A trigger dictionary must include an ContentBlockerTrigger.urlFilter, which specifies a pattern to match the URL against. The remaining properties are optional and modify the behavior of the trigger. For example, you can limit the trigger to specific domains or have it not apply when a match is found on a specific domain.
ContentBlockerTriggerLoadType
Class that represents the possible load type for a ContentBlockerTrigger.
ContentBlockerTriggerResourceType
Class that represents the possible resource type defined for a ContentBlockerTrigger.
ContentWorld
Class that represents an object that defines a scope of execution for JavaScript code and which you use to prevent conflicts between different scripts.
ContextMenu
Class that represents the WebView context menu. It used by WebView.contextMenu.
ContextMenuItem
Class that represent an item of the ContextMenu.
ContextMenuOptions
Class that represents available options used by ContextMenu.
Class that represents a cookie returned by the CookieManager.
CookieManager
Class that implements a singleton object (shared instance) which manages the cookies used by WebView instances. On Android, it is implemented using CookieManager. On iOS, it is implemented using WKHTTPCookieStore.
CreateWindowAction
Class that represents the navigation request used by the WebView.onCreateWindow event.
CRLDistributionPointsExtension
CrossOrigin
Class that represents the crossorigin content attribute on media elements, which is a CORS settings attribute. It could be used with ScriptHtmlTagAttributes and CSSLinkHtmlTagAttributes when fetching a resource <link> or a <script> (or resources fetched by the <script>).
CSSLinkHtmlTagAttributes
Class that represents the possible CSS stylesheet <link> HTML attributes to be set used by InAppWebViewController.injectCSSFileFromUrl.
CustomSchemeResponse
Class representing the response returned by the WebView.onLoadResourceCustomScheme event. It allows to load a specific resource. The resource data must be encoded to base64.
CustomTabsShareState
Android-specific class representing the share state that should be applied to the custom tab.
DecodeInfo
Provides information about the image being decoded.
Decoder
Base class for image format decoders.
DibDecoder
DownloadStartRequest
Class representing a download request of the WebView used by the event WebView.onDownloadStartRequest.
Encoder
Base class for image format encoders.
ExifAsciiValue
ExifByteValue
ExifData
ExifDoubleValue
ExifEntry
ExifIFD
ExifIFDContainer
ExifLongValue
ExifRationalValue
ExifSByteValue
ExifShortValue
ExifSingleValue
ExifSLongValue
ExifSRationalValue
ExifSShortValue
ExifTag
ExifUndefinedValue
ExifValue
ExrAttribute
ExrB44Compressor
ExrChannel
ExrCompressor
ExrDecoder
Decode an OpenEXR formatted image.
ExrHufDec
ExrHuffman
ExrImage
ExrPart
ExrPizCompressor
Wavelet compression
ExrPxr24Compressor
ExrRleCompressor
ExrWavelet
ExrZipCompressor
Favicon
Class that represents a favicon of a website. It is used by InAppWebViewController.getFavicons method.
FetchRequest
Class that represents a HTTP request created with JavaScript using the Fetch API.
FetchRequestAction
Class used by FetchRequest class.
FetchRequestCredential
Class that is an interface for FetchRequestCredentialDefault, FetchRequestFederatedCredential and FetchRequestPasswordCredential classes.
FetchRequestCredentialDefault
Class that represents the default credentials used by an FetchRequest.
FetchRequestFederatedCredential
Class that represents a FederatedCredential type of credentials.
FetchRequestPasswordCredential
Class that represents a PasswordCredential type of credentials.
FontFamilyDropdown
Controls the font family name of the current / selected text.
FontSetting
Encapsulates the font size (for now)
FontSizeDropdown
Controls the font size of the selected / current text.
FormatSettings
Standard format settings
FormResubmissionAction
Class that represents the action to take used by the WebView.androidOnFormResubmission event.
GeolocationPermissionShowPromptResponse
Class used by the host application to set the Geolocation permission state for an origin during the WebView.androidOnGeolocationPermissionsShowPrompt event.
GifColorMap
GifDecoder
A decoder for the GIF image format. This supports both single frame and animated GIF files, and transparency.
GifEncoder
GifImageDesc
GifInfo
Half
A 16-bit floating-point number, used by high-dynamic-range image formats as a more efficient storage for floating-point values that don't require full 32-bit precision. A list of Half floats can be stored in a Uint16List, and converted to a double using the HalfToDouble static method.
HdrImage
A high dynamic range RGBA image stored in 16-bit or 32-bit floating-point channels.
HdrSlice
A slice is the data for an image framebuffer for a single channel.
HeadlessInAppWebView
Class that represents a WebView in headless mode. It can be used to run a WebView in background without attaching an InAppWebView to the widget tree.
HSLWithHueColorPainter
Painter for SL mixture.
HSLWithLightnessColorPainter
Painter for HS mixture.
HSLWithSaturationColorPainter
Painter for HL mixture.
HSVWithHueColorPainter
Painter for SV mixture.
HSVWithSaturationColorPainter
Painter for HV mixture.
HSVWithValueColorPainter
Painter for HS mixture.
HtmlEditor
Slim HTML Editor with API
HtmlEditorApi
API to control the HtmlEditor.
HtmlEditorApiWidget
Use the HtmlEditorApiWidget to provide the HtmlEditorApi to widgets further down the widget tree.
HtmlEditorControls
Predefined editor controls.
HtmlEditorState
You can access the API by accessing the HtmlEditor's state.
HttpAuthCredentialDatabase
Class that implements a singleton object (shared instance) which manages the shared HTTP auth credentials cache. On iOS, this class uses the URLCredentialStorage class. On Android, this class has a custom implementation using android.database.sqlite.SQLiteDatabase because WebViewDatabase doesn't offer the same functionalities as iOS URLCredentialStorage.
HttpAuthenticationChallenge
Class that represents the challenge of the WebView.onReceivedHttpAuthRequest event. It provides all the information about the challenge.
HttpAuthResponse
Class that represents the response used by the WebView.onReceivedHttpAuthRequest event.
HttpAuthResponseAction
Class used by HttpAuthResponse class.
HTTPCookieSameSitePolicy
Class that represents the same site policy of a cookie. Used by the Cookie class.
HUEColorWheelPainter
Painter for hue color wheel.
HueRingPainter
Painter for hue ring.
HueRingPicker
The Color Picker with HUE Ring & HSV model.
IcoDecoder
IcoInfo
IcoInfoImage
Image
An image buffer where pixels are encoded into 32-bit unsigned ints (Uint32).
InAppBrowser
This class uses the native WebView of the platform. The webViewController field can be used to access the InAppWebViewController API.
InAppBrowserClassOptions
Class that represents the options that can be used for an InAppBrowser WebView.
InAppBrowserOptions
This class represents all the cross-platform InAppBrowser options available.
InAppLocalhostServer
This class allows you to create a simple server on http://localhost:[port]/ in order to be able to load your assets file on a server. The default port value is 8080.
InAppWebView
Flutter Widget for adding an inline native WebView integrated in the flutter widget tree.
InAppWebViewController
Controls a WebView, such as an InAppWebView widget instance, a HeadlessInAppWebView instance or InAppBrowser WebView instance.
InAppWebViewGroupOptions
Class that represents the options that can be used for a WebView.
InAppWebViewHitTestResult
Class that represents the hit result for hitting an HTML elements.
InAppWebViewHitTestResultType
Class representing the InAppWebViewHitTestResult type.
InAppWebViewInitialData
Initial data as a content for an WebView instance, using baseUrl as the base URL for it.
InAppWebViewOptions
This class represents all the cross-platform WebView options available.
InAppWebViewRect
A class that represents a structure that contains the location and dimensions of a rectangle.
IndicatorPainter
Painter for chess type alpha background in color indicator widget.
InputBuffer
A buffer that can be read as a stream of bytes.
IOSCookieManager
Class that contains only iOS-specific methods of CookieManager.
IOSInAppBrowserOptions
This class represents all the iOS-only InAppBrowser options available.
IOSInAppWebViewController
Class represents the iOS controller that contains only iOS-specific methods for the WebView.
IOSInAppWebViewOptions
This class represents all the iOS-only WebView options available.
IOSNavigationResponseAction
Class that is used by WebView.iosOnNavigationResponse event. It represents the policy to pass back to the decision handler.
IOSNSAttributedString
An iOS-specific class that represents a string with associated attributes used by the PullToRefreshController and PullToRefreshOptions classes.
IOSNSAttributedStringTextEffectStyle
An iOS-specific Class that represents the supported proxy types.
IOSNSUnderlineStyle
An iOS-specific Class that represents the constants for the underline style and strikethrough style attribute keys.
IOSNSURLProtectionSpaceAuthenticationMethod
An iOS-specific Class that represents the constants describing known values of the URLProtectionSpace.iosAuthenticationMethod property.
IOSNSURLProtectionSpaceProxyType
An iOS-specific Class that represents the supported proxy types.
IosOptions
IOSSafariDismissButtonStyle
An iOS-specific class used to set the custom style for the dismiss button.
IOSSafariOptions
This class represents all the iOS-only ChromeSafariBrowser options available.
IOSShouldAllowDeprecatedTLSAction
Class that is used by WebView.iosShouldAllowDeprecatedTLS event. It represents the policy to pass back to the decision handler.
IOSSslError
Class that represents the iOS-specific primary error associated to the server SSL certificate. Used by the ServerTrustChallenge class.
IOSUIModalPresentationStyle
An iOS-specific class used to specify the modal presentation style when presenting a view controller.
IOSUIModalTransitionStyle
An iOS-specific class used to specify the transition style when presenting a view controller.
IOSUIScrollViewContentInsetAdjustmentBehavior
An iOS-specific class used to configure how safe area insets are added to the adjusted content inset.
IOSUIScrollViewDecelerationRate
Class that represents a floating-point value that determines the rate of deceleration after the user lifts their finger.
IOSURLCredentialPersistence
An iOS-specific class that represents the constants that specify how long the credential will be kept.
IOSURLRequestCachePolicy
An iOS-specific Class that represents the constants used to specify interaction with the cached responses.
IOSURLRequestNetworkServiceType
An iOS-specific Class that represents the constants that specify how a request uses network resources.
IOSURLResponse
IOSWebStorageManager
Class that represents various types of data that a website might make use of. This includes cookies, disk and memory caches, and persistent data such as WebSQL, IndexedDB databases, and local storage.
IOSWKDataDetectorTypes
An iOS-specific class used to specify a dataDetectoryTypes value that adds interactivity to web content that matches the value.
IOSWKFrameInfo
An object that contains information about a frame on a webpage.
IOSWKNavigationResponse
An iOS-specific Class that represents the navigation response used by the WebView.iosOnNavigationResponse event.
IOSWKNavigationType
Class that represents the type of action triggering a navigation on iOS for the WebView.shouldOverrideUrlLoading event.
IOSWKPDFConfiguration
An iOS-specific class that represents the configuration data to use when generating a PDF representation of a web view’s contents.
IOSWKSecurityOrigin
An object that identifies the origin of a particular resource.
IOSWKSelectionGranularity
An iOS-specific class used to set the level of granularity with which the user can interactively select content in the web view.
IOSWKWebsiteDataRecord
Class that represents website data, grouped by domain name using the public suffix list.
IOSWKWebsiteDataType
Class that represents a website data type.
IOSWKWindowFeatures
An iOS-specific class that specifies optional attributes for the containing window when a new web view is requested.
JavaScriptReplyProxy
This class represents the JavaScript object injected by InAppWebViewController.addWebMessageListener. An instance will be given by WebMessageListener.onPostMessage. The app can use postMessage(String) to talk to the JavaScript context.
Jpeg
JpegAdobe
JpegComponent
JpegData
JpegDecoder
Decode a jpeg encoded image.
JpegEncoder
Encode an image to the JPEG format.
JpegFrame
JpegInfo
JpegJfif
JpegScan
JsAlertRequest
Class that represents the request of the WebView.onJsAlert event.
JsAlertResponse
Class that represents the response used by the WebView.onJsAlert event to control a JavaScript alert dialog.
JsAlertResponseAction
Class used by JsAlertResponse class.
JsBeforeUnloadRequest
Class that represents the request of the WebView.androidOnJsBeforeUnload event.
JsBeforeUnloadResponse
Class that represents the response used by the WebView.androidOnJsBeforeUnload event to control a JavaScript alert dialog.
JsBeforeUnloadResponseAction
Class used by JsBeforeUnloadResponse class.
JsConfirmRequest
Class that represents the request of the WebView.onJsConfirm event.
JsConfirmResponse
Class that represents the response used by the WebView.onJsConfirm event to control a JavaScript confirm dialog.
JsConfirmResponseAction
Class used by JsConfirmResponse class.
JsPromptRequest
Class that represents the request of the WebView.onJsPrompt event.
JsPromptResponse
Class that represents the response used by the WebView.onJsPrompt event to control a JavaScript prompt dialog.
JsPromptResponseAction
Class used by JsPromptResponse class.
KeyUsage
LinkButton
Allows to enter and edit links
LinkEditor
A dialog to enter or edit links
LinkSettings
Link settings
LoadedResource
Class representing a resource response of the WebView. It is used by the method WebView.onLoadResource.
LocalStorage
Class that provides methods to manage the JavaScript window.localStorage object. It used by WebStorage.
LoginRequest
Class used by WebView.androidOnReceivedLoginRequest event.
LzwDecoder
MaterialPicker
MetaTag
Class that represents a <meta> HTML tag. It is used by the InAppWebViewController.getMetaTags method.
MetaTagAttribute
Class that represents an attribute of a <meta> HTML tag. It is used by the MetaTag class.
MultipleChoiceBlockPicker
An object that contains information about an action that causes navigation to occur.
Class that is used by WebView.shouldOverrideUrlLoading event. It represents the policy to pass back to the decision handler.
NeuralQuantizer
Compute a color map with a given number of colors that best represents the given image.
OID
OutputBuffer
PackagedHtmlEditor
A combination of controls and editor for a simpler usage.
PackagedHtmlEditorState
The state for the PackagedHtmlEditor widget.
PermissionRequestResponse
Class that represents the response used by the WebView.androidOnPermissionRequest event.
PermissionRequestResponseAction
Class used by PermissionRequestResponse class.
PngDecoder
Decode a PNG encoded image.
PngEncoder
Encode an image to the PNG format.
PngFrame
PngInfo
Point
2-dimensional point
PsdBevelEffect
PsdBlendingRanges
PsdChannel
PsdDecoder
Decode a Photoshop PSD image.
PsdDropShadowEffect
PsdEffect
PsdImage
PsdImageResource
PsdInnerGlowEffect
PsdInnerShadowEffect
PsdLayer
PsdLayerAdditionalData
PsdLayerData
PsdLayerSectionDivider
PsdMask
PsdOuterGlowEffect
PsdSolidFillEffect
PullToRefreshController
A standard controller that can initiate the refreshing of a scroll view’s contents. This should be used whenever the user can refresh the contents of a WebView via a vertical swipe gesture.
PullToRefreshOptions
PvrtcColorBoundingBox<Color extends PvrtcColorRgbCore<Color>>
PvrtcColorRgb
PvrtcColorRgba
PvrtcColorRgbCore<T>
PvrtcDecoder
PvrtcEncoder
PvrtcPacket
Rational
ReferrerPolicy
Class that represents a Referrer-Policy HTTP header. It could be used with ScriptHtmlTagAttributes and CSSLinkHtmlTagAttributes when fetching a resource <link> or a <script> (or resources fetched by the <script>).
RendererPriority
Class used by RendererPriorityPolicy class.
RendererPriorityPolicy
Class that represents the priority policy will be used to determine whether an out of process renderer should be considered to be a target for OOM killing. When a WebView is destroyed it will cease to be considerered when calculating the renderer priority. Once no WebViews remain associated with the renderer, the priority of the renderer will be reduced to RendererPriority.RENDERER_PRIORITY_WAIVED. The default policy is to set the priority to RendererPriority.RENDERER_PRIORITY_IMPORTANT regardless of visibility, and this should not be changed unless the caller also handles renderer crashes with WebView.androidOnRenderProcessGone. Any other setting will result in WebView renderers being killed by the system more aggressively than the application.
RenderProcessGoneDetail
Class that provides more specific information about why the render process exited. It is used by the WebView.androidOnRenderProcessGone event.
RequestFocusNodeHrefResult
Class that represents the result used by the InAppWebViewController.requestFocusNodeHref method.
RequestImageRefResult
Class that represents the result used by the InAppWebViewController.requestImageRef method.
RGBWithBlueColorPainter
Painter for RG mixture.
RGBWithGreenColorPainter
Painter for RB mixture.
RGBWithRedColorPainter
Painter for GB mixture.
SafeBrowsingResponse
Class that represents the response used by the WebView.androidOnSafeBrowsingHit event. It is used to indicate an action to take when hitting a malicious URL.
SafeBrowsingResponseAction
Class used by SafeBrowsingResponse class.
SafeBrowsingThreat
Class that represents the reason the resource was caught by Safe Browsing.
ScreenshotConfiguration
Class that represents the configuration data to use when generating an image from a web view’s contents using InAppWebViewController.takeScreenshot.
ScriptHtmlTagAttributes
Class that represents the possible the <script> HTML attributes to be set used by InAppWebViewController.injectJavascriptFileFromUrl.
SeparableKernel
A kernel object to use with separableConvolution filtering.
ServerTrustAuthResponse
ServerTrustAuthResponse class represents the response used by the WebView.onReceivedServerTrustAuthRequest event.
ServerTrustAuthResponseAction
Class used by ServerTrustAuthResponse class.
ServerTrustChallenge
Class that represents the challenge of the WebView.onReceivedServerTrustAuthRequest event. It provides all the information about the challenge.
SessionStorage
Class that provides methods to manage the JavaScript window.sessionStorage object. It used by WebStorage.
SlidePicker
The Color Picker with sliders only. Support HSV, HSL and RGB color model.
SliverHeaderHtmlEditorControls
HTML editor controls to be used within a sliver-based view.
SslCertificate
SSL certificate info (certificate details) class.
SslCertificateDName
Distinguished name helper class. Used by SslCertificate.
SslError
Class that represents an SSL Error.
Storage
Class that provides methods to manage the JavaScript Storage object. It is used by LocalStorage and SessionStorage.
SubjectKeyIdentifierExtension
Recognition for Subject Key Identifier Extension (2.5.29.14)
TextSelectionMenuItem
Abstracts a text selection menu item.
TgaDecoder
Decode a TGA image. This only supports the 24-bit uncompressed format.
TgaEncoder
Encode a TGA image. This only supports the 24-bit uncompressed format.
TgaInfo
ThumbPainter
Painter for thumb of slider.
TiffBitReader
TiffDecoder
TiffEncoder
Encode a TIFF image.
TiffEntry
TiffFaxDecoder
TiffImage
TiffInfo
TrackPainter
Painter for all kinds of track types.
Trim
TrustedWebActivityDefaultDisplayMode
Android-class that represents the default display mode of a Trusted Web Activity. The system UI (status bar, navigation bar) is shown, and the browser toolbar is hidden while the user is on a verified origin.
TrustedWebActivityDisplayMode
Android-class that represents display mode of a Trusted Web Activity.
TrustedWebActivityImmersiveDisplayMode
Android-class that represents the default display mode of a Trusted Web Activity. The system UI (status bar, navigation bar) is shown, and the browser toolbar is hidden while the user is on a verified origin.
TrustedWebActivityScreenOrientation
Android-specific class representing Screen Orientation Lock type value of a Trusted Web Activity: https://www.w3.org/TR/screen-orientation/#screenorientation-interface
UpperCaseTextFormatter
Uppercase text formater
URLAuthenticationChallenge
Class that represents a challenge from a server requiring authentication from the client. It provides all the information about the challenge.
URLCredential
Class that represents an authentication credential consisting of information specific to the type of credential and the type of persistent storage to use, if any.
URLProtectionSpace
Class that represents a protection space requiring authentication.
URLProtectionSpaceHttpAuthCredentials
Class that represents a URLProtectionSpace with all of its HttpAuthCredentials. It used by HttpAuthCredentialDatabase.getAllAuthCredentials.
URLRequest
A URL load request that is independent of protocol or URL scheme.
UserPreferredContentMode
Class that represents the content mode to prefer when loading and rendering a webpage.
UserScript
Class that represents a script that the WebView injects into the web page.
UserScriptInjectionTime
Class that represents contains the constants for the times at which to inject script content into a WebView used by an UserScript.
VP8
VP8BandProbas
VP8BitReader
VP8Filter
VP8FilterHeader
VP8FInfo
VP8FrameHeader
VP8L
VP8LBitReader
VP8LColorCache
VP8LTransform
VP8MB
VP8MBData
VP8PictureHeader
VP8Proba
VP8QuantMatrix
VP8Random
VP8SegmentHeader
VP8TopSamples
WebArchiveFormat
Class that represents the known Web Archive formats used when saving a web page.
WebHistory
This class contains a snapshot of the current back/forward list for a WebView.
WebHistoryItem
A convenience class for accessing fields in an entry in the back/forward list of a WebView. Each WebHistoryItem is a snapshot of the requested history item.
WebMessage
The Dart representation of the HTML5 PostMessage event. See https://html.spec.whatwg.org/multipage/comms.html#the-messageevent-interfaces for definition of a MessageEvent in HTML5.
WebMessageChannel
The representation of the HTML5 message channels.
WebMessageListener
This listener receives messages sent on the JavaScript object which was injected by InAppWebViewController.addWebMessageListener.
WebMessagePort
The representation of the HTML5 message ports.
WebPAlpha
WebPDecoder
Decode a WebP formatted image. This supports lossless (vp8l), lossy (vp8), lossy+alpha, and animated WebP images.
WebPEncoder
Encode an image to the PNG format.
WebPFilters
WebPFrame
WebPInfo
WebResourceRequest
Class representing a resource request of the WebView used by the event WebView.androidShouldInterceptRequest. NOTE: available only on Android.
WebResourceResponse
Class representing a resource response of the WebView used by the event WebView.androidShouldInterceptRequest. NOTE: available only on Android.
WebStorage
Class that provides access to the JavaScript Web Storage API: window.sessionStorage and window.localStorage. It used by InAppWebViewController.webStorage.
WebStorageItem
Class that represents a single web storage item of the JavaScript window.sessionStorage and window.localStorage objects.
WebStorageManager
Class that implements a singleton object (shared instance) which manages the web storage used by WebView instances. On Android, it is implemented using WebStorage. On iOS, it is implemented using WKWebsiteDataStore.default().
WebStorageType
Class that represents the type of Web Storage: localStorage or sessionStorage. Used by the Storage class.
WebView
Abstract class that represents a WebView. Used by InAppWebView and HeadlessInAppWebView.
WebViewImplementation
Class that represents the WebView native implementation to be used.
WebViewOptions
WebViewRenderProcessAction
Class that represents the action to take used by the WebView.androidOnRenderProcessUnresponsive and WebView.androidOnRenderProcessResponsive event to terminate the Android WebViewRenderProcess.
X509Certificate
Class that represents a X.509 certificate. This provides a standard way to access all the attributes of an X.509 certificate.
X509Extension
X509PublicKey

Enums

BlendMode
Channel
Channels
ColorLabelType
Color information label type.
ColorModel
Types for slider picker widget.
DisposeMode
DitherKernel
ElementAlign
Standard align settings
ExifValueType
Flip
FontSize
Font-sizes
Format
FrameType
Interpolation
NoiseType
PaletteType
Palette types for color picker area widget.
PixelateMode
QuantizeMethod
SafeFont
Contains safe font names that can be used across mobile, web and desktop
TrackType
Track types for slider picker.
TrimMode
X509BlockPosition

Extensions

SafeFontNamesExtension on SafeFont
Extends SafeFont

Constants

ExifTagNameToID → const Map<String, int>
ExifValueTypeSize → const List<int>
ExifValueTypeString → const List<String>
kCompleteValidHexPattern → const String
RegExp pattern for validation complete HEX color String, allows only:
kValidHexPattern → const String
RegExp pattern for validation HEX color String inputs, allows only:

Properties

arial_14 BitmapFont
14px Arial font for use with drawString and drawChar.
final
arial_24 BitmapFont
24px Arial font for use with drawString and drawChar.
final
arial_48 BitmapFont
48px Arial font for use with drawString and drawChar.
final
ExifGpsTags Map<int, ExifTag>
final
ExifImageTags Map<int, ExifTag>
final
ExifInteropTags Map<int, ExifTag>
final

Functions

adjustColor(Image src, {int? blacks, int? whites, int? mids, num? contrast, num? saturation, num? brightness, num? gamma, num? exposure, num? hue, num? amount}) Image
Adjust the color of the src image using various color transformations.
alphaBlendColors(int dst, int src, [int fraction = 0xff]) int
Returns a new color of src alpha-blended onto dst. The opacity of src is additionally scaled by fraction / 255.
bakeOrientation(Image image) Image
If image has an orientation value in its exif data, this will rotate the image so that it physically matches its orientation. This can be used to bake the orientation of the image for image formats that don't support exif data.
brightness(Image? src, int brightness) Image?
Set the brightness level for the image src. brightness is an offset that is added to the red, green, and blue channels of every pixel.
bumpToNormal(Image src, {num strength = 2.0}) Image
Generate a normal map from a heightfield bump image.
clipLine(List<int> line, List<int> rect) bool
Clip a line to a rectangle using the Cohen–Sutherland clipping algorithm. line is a list of 4 ints <x1, y1, x2, y2>. rect is a list of 4 ints <x1, y1, x2, y2>. Results are stored in line. If line falls completely outside of rect, false is returned, otherwise true is returned.
cmykToRgb(num c, num m, num y, num k) List<int>
Convert a CMYK color to RGB, where c, m, y, k values are in the range 0, 255. Returns a list r, g, b with values in the range 0, 255.
colorFromHex(String inputString, {bool enableAlpha = true}) Color?
Try to convert text input or any String to valid Color. The String must be provided in one of those formats:
colorOffset(Image src, {int red = 0, int green = 0, int blue = 0, int alpha = 0}) Image
Add the red, green, blue and alpha values to the src image colors, a per-channel brightness.
colorToHex(Color color, {bool includeHashSign = false, bool enableAlpha = true, bool toUpperCase = true}) String
Converts dart:ui Color to the 6/8 digits HEX String.
contrast(Image? src, num contrast) Image?
Set the contrast level for the image src.
convolution(Image src, List<num> filter, {num div = 1.0, num offset = 0.0}) Image
Apply a 3x3 convolution filter to the src image. filter should be a list of 9 numbers.
copyCrop(Image src, int x, int y, int w, int h) Image
Returns a cropped copy of src.
copyCropCircle(Image src, {int? radius, Point? center}) Image
Returns a round cropped copy of src.
copyInto(Image dst, Image src, {int? dstX, int? dstY, int? srcX, int? srcY, int? srcW, int? srcH, bool blend = true, bool center = false}) Image
Copies a rectangular portion of one image to another image. dst is the destination image, src is the source image identifier.
copyRectify(Image src, {required Point topLeft, required Point topRight, required Point bottomLeft, required Point bottomRight, Image? toImage}) Image
Returns a copy of the src image, where the given rectangle has been mapped to the full image.
copyResize(Image src, {int? width, int? height, Interpolation interpolation = Interpolation.nearest}) Image
Returns a resized copy of the src image. If height isn't specified, then it will be determined by the aspect ratio of src and width. If width isn't specified, then it will be determined by the aspect ratio of src and height.
copyResizeCropSquare(Image src, int size) Image
Returns a resized and square cropped copy of the src image of size size.
copyRotate(Image src, num angle, {Interpolation interpolation = Interpolation.nearest}) Image
Returns a copy of the src image, rotated by angle degrees.
crand(Random rand) double
Return a random variable between -1,1.
decodeAnimation(List<int> data) Animation?
Decode the given image file bytes by first identifying the format of the file and using that decoder to decode the file into an Animation containing one or more Image frames.
decodeBmp(List<int> bytes) Image?
Decode a BMP formatted image.
decodeExr(List<int> bytes, {double exposure = 1.0}) Image?
Decode an OpenEXR formatted image, tone-mapped using the given exposure to a low-dynamic-range Image.
decodeGif(List<int> bytes) Image?
Decode a GIF formatted image (first frame for animations).
decodeGifAnimation(List<int> bytes) Animation?
Decode an animated GIF file. If the GIF isn't animated, the animation will contain a single frame with the GIF's image.
decodeIco(List<int> bytes) Image?
Decode an ICO image.
decodeImage(List<int> data) Image?
Decode the given image file bytes by first identifying the format of the file and using that decoder to decode the file into a single frame Image.
decodeJpg(List<int> bytes) Image?
Decode a JPG formatted image.
decodeNamedAnimation(List<int> bytes, String name) Animation?
Identify the format of the image using the file extension of the given name, and decode the given file bytes to an Animation with one or more Image frames. See also decodeAnimation.
decodeNamedImage(List<int> bytes, String name) Image?
Identify the format of the image using the file extension of the given name, and decode the given file bytes to a single frame Image. See also decodeImage.
decodePng(List<int> bytes) Image?
Decode a PNG formatted image.
decodePngAnimation(List<int> bytes) Animation?
Decode a PNG formatted animation.
decodePsd(List<int> bytes) Image?
Decode a Photoshop PSD formatted image.
decodeTga(List<int> bytes) Image?
Decode a Targa formatted image.
decodeTiff(List<int> bytes) Image?
Decode a TIFF formatted image.
decodeTiffAnimation(List<int> bytes) Animation?
Decode an multi-image (animated) TIFF file. If the tiff doesn't have multiple images, the animation will contain a single frame with the tiff's image.
decodeWebP(List<int> bytes) Image?
Decode a WebP formatted image (first frame for animations).
decodeWebPAnimation(List<int> bytes) Animation?
Decode an animated WebP file. If the webp isn't animated, the animation will contain a single frame with the webp's image.
ditherPixels(Image image, NeuralQuantizer quantizer, DitherKernel kernel, bool serpentine) Uint8List
drawChar(Image image, BitmapFont font, int x, int y, String char, {int? color}) Image
Draw a single character from char horizontally into image at position x,y with the given color.
drawCircle(Image image, int x0, int y0, int radius, int color) Image
Draw a circle into the image with a center of x0,y0 and the given radius and color.
drawImage(Image dst, Image src, {int? dstX, int? dstY, int? dstW, int? dstH, int? srcX, int? srcY, int? srcW, int? srcH, bool blend = true}) Image
Draw the image src onto the image dst.
drawLine(Image image, int x1, int y1, int x2, int y2, int color, {bool antialias = false, num thickness = 1}) Image
Draw a line into image.
drawPixel(Image image, int x, int y, int color, [int opacity = 0xff]) Image
Draw a single pixel into the image, applying alpha and opacity blending.
drawRect(Image dst, int x1, int y1, int x2, int y2, int color) Image
Draw a rectangle in the image dst with the color.
drawString(Image image, BitmapFont font, int x, int y, String string, {int color = 0xffffffff, bool rightJustify = false}) Image
Draw a string horizontally into image horizontally into image at position x,y with the given color.
drawStringCentered(Image image, BitmapFont font, String string, {int? x, int? y, int color = 0xffffffff}) Image
Draw a string horizontally into image at position x,y with the given color. If x is omitted text is automatically centered into image If y is omitted text is automatically centered into image. If both x and y are provided it has the same behaviour of drawString method.
drawStringWrap(Image image, BitmapFont font, int x, int y, String string, {int color = 0xffffffff}) Image
Same as drawString except the strings will wrap around to create multiple lines. You can load your own font, or use one of the existing ones such as: arial_14, arial_24, or arial_48.
dropShadow(Image src, int hShadow, int vShadow, int blur, {int shadowColor = 0xa0000000}) Image
Create a drop-shadow effect for the image.
emboss(Image src) Image
Apply an emboss convolution filter.
encodeBmp(Image image) List<int>
encodeCur(Image image) List<int>
Encode an image to the CUR format.
encodeCurImages(List<Image> images) List<int>
Encode a list of images to the CUR format.
encodeGif(Image image, {int samplingFactor = 10}) List<int>
Encode an image to the GIF format.
encodeGifAnimation(Animation anim, {int samplingFactor = 30}) List<int>?
Encode an animation to the GIF format.
encodeIco(Image image) List<int>
Encode an image to the ICO format.
encodeIcoImages(List<Image> images) List<int>
Encode a list of images to the ICO format.
encodeJpg(Image image, {int quality = 100}) List<int>
Encode an image to the JPEG format.
encodeNamedImage(Image image, String name) List<int>?
Identify the format of the image and encode it with the appropriate Encoder.
encodePng(Image image, {int level = 6}) List<int>
Encode an image to the PNG format.
encodePngAnimation(Animation anim, {int level = 6}) List<int>?
Encode an animation to the PNG format.
encodeTga(Image image) List<int>
Encode an image to the Targa format.
fill(Image image, int color) Image
Set all of the pixels of an image to the given color.
fillCircle(Image image, int x0, int y0, int radius, int color) Image
Draw and fill a circle into the image with a center of x0,y0 and the given radius and color.
fillFlood(Image src, int x, int y, int color, {num threshold = 0.0, bool compareAlpha = false}) Image
Fill the 4-connected shape containing x,y in the image src with the given color.
fillRect(Image src, int x1, int y1, int x2, int y2, int color) Image
Fill a rectangle in the image src with the given color with the corners x1,y1 and x2,y2.
findDecoderForData(List<int> data) Decoder?
Find a Decoder that is able to decode the given image data. Use this is you don't know the type of image it is. Since this will validate the image against all known decoders, it is potentially very slow.
findStringHeight(BitmapFont font, String string) int
findTrim(Image src, {TrimMode mode = TrimMode.transparent, Trim sides = Trim.all}) List<int>
Find the crop area to be used by the trim function. Returns the coordinates as x, y, width, height. You could pass these coordinates to the copyCrop function to crop the image.
firstLeafValue({required ASN1Object block}) → dynamic
flip(Image src, Flip mode) Image
Flips the src image using the given mode, which can be one of: Flip.horizontal, Flip.vertical, or Flip.both.
flipHorizontal(Image src) Image
Flip the src image horizontally.
flipVertical(Image src) Image
Flip the src image vertically.
gaussianBlur(Image src, int radius) Image
Apply gaussian blur to the src image. radius determines how many pixels away from the current pixel should contribute to the blur, where 0 is no blur and the larger the radius, the stronger the blur.
getAlpha(int color) int
Get the alpha channel from the color.
getBlue(int color) int
Get the blue channel from the color.
getChannel(int color, Channel channel) int
Get the channel from the color.
getColor(int r, int g, int b, [int a = 255]) int
Get the color with the given r, g, b, and a components.
getDecoderForNamedImage(String name) Decoder?
Return the Decoder that can decode image with the given name, by looking at the file extension. See also findDecoderForData to determine the decoder to use given the bytes of the file.
getGreen(int color) int
Get the green channel from the color.
getLuminance(int color) int
Returns the luminance (grayscale) value of the color.
getLuminanceRgb(int r, int g, int b) int
Returns the luminance (grayscale) value of the color.
getRed(int color) int
Get the red channel from the color.
grand(Random rand) double
Return a random variable following a gaussian distribution and a standard deviation of 1.
grayscale(Image src) Image
Convert the image to grayscale.
hdrBloom(HdrImage hdr, {double radius = 0.01, double weight = 0.1}) HdrImage
Applies an HDR bloom filter to the image, in-place.
hdrGamma(HdrImage hdr, {double gamma = 2.2}) HdrImage
Apply gamma scaling to the HDR image, in-place.
hdrToImage(HdrImage hdr, {num? exposure}) Image
Convert a high dynamic range image to a low dynamic range image, with optional exposure control.
hslToHsv(HSLColor color) HSVColor
Convert HSL to HSV
hslToRgb(num hue, num saturation, num lightness) List<int>
Convert an HSL color to RGB, where h is specified in normalized degrees 0, 1 (where 1 is 360-degrees); s and l are in the range 0, 1. Returns a list r, g, b with values in the range 0, 255.
hsvToHsl(HSVColor color) HSLColor
Convert HSV to HSL
hsvToRgb(num hue, num saturation, num brightness) List<int>
Convert an HSV color to RGB, where h is specified in normalized degrees 0, 1 (where 1 is 360-degrees); s and l are in the range 0, 1. Returns a list r, g, b with values in the range 0, 255.
invert(Image src) Image
Invert the colors of the src image.
isBlack(int color) bool
check if color is white
isWhite(int color) bool
check if color is white
labToRgb(num l, num a, num b) List<int>
Convert a CIE-L*ab color to RGB.
labToXyz(num l, num a, num b) List<int>
Convert a CIE-L*ab color to XYZ.
maskFlood(Image src, int x, int y, {num threshold = 0.0, bool compareAlpha = false, int fillValue = 255}) Uint8List
Create a mask describing the 4-connected shape containing x,y in the image src.
minMax(Image image) List<int>
Find the minimum and maximum color value in the image. Returns a list as <min, max>.
noise(Image image, num sigma, {NoiseType type = NoiseType.gaussian, Random? random}) Image
Add random noise to pixel values. sigma determines how strong the effect should be. type should be one of the following: NoiseType.gaussian, NoiseType.uniform, NoiseType.salt_pepper, NoiseType.poisson, or NoiseType.rice.
normalize(Image src, int minValue, int maxValue) Image
Linearly normalize the colors of the image. All color values will be mapped to the range minValue, maxValue inclusive.
pixelate(Image src, int blockSize, {PixelateMode mode = PixelateMode.upperLeft}) Image
Pixelate the src image.
prand(Random rand, double z) int
Return a random variable following a Poisson distribution of parameter z.
quantize(Image src, {int numberOfColors = 256, QuantizeMethod method = QuantizeMethod.neuralNet}) Image
Quantize the number of colors in image to 256.
readFont(String font, Image map) BitmapFont
Decode a BitmapFont from the contents of font definition (.fnt) file, and an Image that stores the font map.
readFontZip(List<int> bytes) BitmapFont
Decode a BitmapFont from the contents of a zip file that stores the .fnt font definition and associated PNG images.
readJpg(List<int> bytes) Image?
Renamed to decodeJpg, left for backward compatibility.
readPng(List<int> bytes) Image?
Renamed to decodePng, left for backward compatibility.
readTga(List<int> bytes) Image?
Renamed to decodeTga, left for backward compatibility.
reinhardToneMap(HdrImage hdr) HdrImage
Applies Reinhard tone mapping to the hdr image, in-place.
remapColors(Image src, {Channel red = Channel.red, Channel green = Channel.green, Channel blue = Channel.blue, Channel alpha = Channel.alpha}) Image
Remap the color channels of the image. red, green, blue and alpha should be set to one of the following: Channel.red, Channel.green, Channel.blue, Channel.alpha, or Channel.luminance. For example, remapColors(src, red: Channel.green, green: Channel.red); will swap the red and green channels of the image. remapColors(src, alpha: Channel.luminance) will set the alpha channel to the luminance (grayscale) of the image.
rgbToHsl(num r, num g, num b) List<num>
Convert an RGB color to HSL, where r, g and b are in the range 0, 255. Returns a list h, s, l with values in the range 0, 1.
rgbToLab(num r, num g, num b) List<num>
Convert a RGB color to CIE-L*ab.
rgbToXyz(num r, num g, num b) List<num>
Convert a RGB color to XYZ.
scaleRgba(Image src, int r, int g, int b, int a) Image
separableConvolution(Image src, SeparableKernel kernel) Image
Apply a generic separable convolution filter the src image, using the given kernel.
sepia(Image src, {num amount = 1.0}) Image
Apply sepia tone to the image.
setAlpha(int color, int value) int
Returns a new color where the alpha channel of color has been replaced by value.
setBlue(int color, int value) int
Returns a new color where the blue channel of color has been replaced by value.
setChannel(int color, Channel channel, int value) int
Returns a new color, where the given color's channel has been replaced with the given value.
setGreen(int color, int value) int
Returns a new color where the green channel of color has been replaced by value.
setRed(int color, int value) int
Returns a new color where the red channel of color has been replaced by value.
smooth(Image src, num w) Image
Apply a smoothing convolution filter to the src image.
sobel(Image src, {num amount = 1.0}) Image
Apply Sobel edge detection filtering to the src Image.
toIntValue(List<int> data) BigInt?
trim(Image src, {TrimMode mode = TrimMode.transparent, Trim sides = Trim.all}) Image
Automatically crops the image by finding the corners of the image that meet the mode criteria (not transparent or a different color).
useWhiteForeground(Color backgroundColor, {double bias = 0.0}) bool
Check if is good condition to use white foreground color by passing the background color, and optional bias.
vignette(Image src, {num start = 0.3, num end = 0.75, num amount = 0.8}) Image
writeJpg(Image image, {int quality = 100}) List<int>
Renamed to encodeJpg, left for backward compatibility.
writePng(Image image, {int level = 6}) List<int>
Renamed to encodePng, left for backward compatibility.
writeTga(Image image) List<int>
Renamed to encodeTga, left for backward compatibility.
xyzToLab(num x, num y, num z) List<num>
Convert a XYZ color to CIE-L*ab.
xyzToRgb(num x, num y, num z) List<int>
Convert an XYZ color to RGB.

Typedefs

JavaScriptHandlerCallback = dynamic Function(List arguments)
This type represents a callback, added with InAppWebViewController.addJavaScriptHandler, that listens to post messages sent from JavaScript.
OnPostMessageCallback = void Function(String? message, Uri? sourceOrigin, bool isMainFrame, JavaScriptReplyProxy replyProxy)
The listener for handling WebMessageListener events sent by a postMessage() on the injected JavaScript object.
PickerItem = Widget Function(Color color)
Child widget for layout builder.
PickerItemBuilder = Widget Function(Color color, bool isCurrentColor, void changeColor())
Customize the item shape.
PickerLayoutBuilder = Widget Function(BuildContext context, List<Color> colors, PickerItem child)
Customize the layout.
WebMessageCallback = void Function(String? message)
The listener for handling WebMessagePort events. The message callback methods are called on the main thread.