Callbacks class

Manages all the callback functions the library provides

Constructors

Callbacks({dynamic onBeforeCommand(String?)?, dynamic onChange(String?)?, dynamic onChangeCodeview(String?)?, dynamic onDialogShown()?, dynamic onEnter()?, dynamic onFocus()?, dynamic onBlur()?, dynamic onBlurCodeview()?, dynamic onImageLinkInsert(String?)?, dynamic onImageUpload(FileUpload)?, dynamic onImageUploadError(FileUpload?, String?, UploadError)?, dynamic onInit()?, dynamic onKeyUp(int?)?, dynamic onKeyDown(int?)?, dynamic onMouseUp()?, dynamic onMouseDown()?, dynamic onPaste()?, dynamic onScroll()?})

Properties

hashCode int
The hash code for this object.
no setterinherited
onBeforeCommand ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic 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
onChange ↔ dynamic Function(String?)?
Called whenever the HTML content of the editor is changed and the editor is in rich text view.
getter/setter pair
onChangeCodeview ↔ dynamic Function(String?)?
Called whenever the code of the editor is changed and the editor is in code view.
getter/setter pair
onDialogShown ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic 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 ↔ dynamic Function(int?)?
Called whenever a key is downed and the editor is in rich text view.
getter/setter pair
onKeyUp ↔ dynamic Function(int?)?
Called whenever a key is released and the editor is in rich text view.
getter/setter pair
onMouseDown ↔ dynamic Function()?
Called whenever the mouse/finger is downed and the editor is in rich text view.
getter/setter pair
onMouseUp ↔ dynamic Function()?
Called whenever the mouse/finger is released and the editor is in rich text view.
getter/setter pair
onPaste ↔ dynamic 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 ↔ dynamic 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