Callbacks class

Manages all the callback functions the library provides

Constructors

Callbacks({void onBeforeCommand(String?)?, void onChangeContent(String?)?, void onChangeCodeview(String?)?, void onChangeSelection(EditorSettings)?, void onDialogShown()?, void onEnter()?, void onFocus()?, void onBlur()?, void onBlurCodeview()?, void onImageLinkInsert(String?)?, void onImageUpload(FileUpload)?, void onImageUploadError(FileUpload?, String?, UploadError)?, void onInit()?, void onKeyUp(int?)?, void onKeyDown(int?)?, void onMouseUp()?, void onMouseDown()?, FutureOr<NavigationActionPolicy> onNavigationRequestMobile(String)?, void onPaste()?, void onScroll()?})

Properties

hashCode int
The hash code for this object.
no setterinherited
onBeforeCommand ↔ void Function(String?)?
Called before certain commands are fired and the editor is in rich text view. There is currently no documentation on this parameter, thus it is unclear which commands this will fire before.
getter/setter pair
onBlur ↔ void Function()?
Called whenever either the rich text field or the codeview field loses focus. This will also be triggered when switching from the rich text editor to the code view editor.
getter/setter pair
onBlurCodeview ↔ void Function()?
Called whenever the code view either gains or loses focus (the Summernote docs say this will only be called when the code view loses focus but in my testing this is not the case). This will also be triggered when switching between the rich text editor and the code view editor.
getter/setter pair
onChangeCodeview ↔ void Function(String?)?
Called whenever the code of the editor is changed and the editor is in code view.
getter/setter pair
onChangeContent ↔ void Function(String?)?
Called whenever the HTML content of the editor is changed and the editor is in rich text view.
getter/setter pair
onChangeSelection ↔ void Function(EditorSettings)?
Called whenever the selection area of the editor is changed.
getter/setter pair
onDialogShown ↔ void Function()?
Called whenever a dialog is shown in the editor. The dialogs will be either the link, image, video, or help dialogs.
getter/setter pair
onEnter ↔ void Function()?
Called whenever the enter/return key is pressed and the editor is in rich text view. There is currently no way to detect enter/return when the editor is in code view.
getter/setter pair
onFocus ↔ void Function()?
Called whenever the rich text field gains focus. This will not be called when the code view editor gains focus, instead use onBlurCodeview for that.
getter/setter pair
onImageLinkInsert ↔ void Function(String?)?
Called whenever an image is inserted via a link. The function passes the URL of the image inserted into the editor.
getter/setter pair
onImageUpload ↔ void Function(FileUpload)?
Called whenever an image is inserted via upload. The function passes the FileUpload class, containing the filename, size, MIME type, base64 data, and last modified information so you can upload it into your server.
getter/setter pair
onImageUploadError ↔ void Function(FileUpload?, String?, UploadError)?
Called whenever an image is failed to be inserted via upload. The function passes the FileUpload class, containing the filename, size, MIME type, base64 data, and last modified information so you can do error handling.
getter/setter pair
onInit ↔ void Function()?
Called whenever InAppWebViewController.onLoadStop is fired on mobile or when the IFrameElement.onLoad stream is fired on web. Note that this method will also be called on refresh on both platforms.
getter/setter pair
onKeyDown ↔ void Function(int?)?
Called whenever a key is downed and the editor is in rich text view.
getter/setter pair
onKeyUp ↔ void Function(int?)?
Called whenever a key is released and the editor is in rich text view.
getter/setter pair
onMouseDown ↔ void Function()?
Called whenever the mouse/finger is downed and the editor is in rich text view.
getter/setter pair
onMouseUp ↔ void Function()?
Called whenever the mouse/finger is released and the editor is in rich text view.
getter/setter pair
onNavigationRequestMobile FutureOr<NavigationActionPolicy> Function(String)?
Called right before the URL of the webview is changed on mobile. This allows you to prevent URLs from loading, or launch them externally, for example.
getter/setter pair
onPaste ↔ void Function()?
Called whenever text is pasted into the rich text field. This will not be called when text is pasted into the code view editor.
getter/setter pair
onScroll ↔ void Function()?
Called whenever the editor is scrolled and it is in rich text view. Editor scrolled is considered to be the editor box only, not the webview container itself. Thus, this callback will only fire when the content in the editor is longer than the editor height. This function can be called with an explicit scrolling action via the mouse, or also via implied scrolling, e.g. the enter key scrolling the editor to make new text visible.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited