HtmlEditor constructor
HtmlEditor({
- Key? key,
- EditorController? controller,
- dynamic onChange()?,
- dynamic onFocus()?,
- dynamic onBlur()?,
- double minHeight = 300.0,
- EdgeInsets padding = EdgeInsets.zero,
- bool autoAdjustScroll = false,
- bool flexibleHeight = false,
- String backgroundColorCssCode = "#ffffff",
- String placeholder = "Edit text",
- String? initialText,
- bool printWebViewLog = false,
- String webViewTitle = "Editor",
- bool useAndroidHybridComposition = false,
- bool showLoadingWheel = false,
- double scaleFactor = 1.0,
- InAppWebViewGroupOptions? webViewOptions,
Creates a HtmlEditor.
No paramameters are required
. But if autoAdjustScroll is true
,
then EditorController.scrollController must not be null
.
Implementation
HtmlEditor({
Key? key,
EditorController? controller,
this.onChange,
this.onFocus,
this.onBlur,
this.minHeight = 300.0,
this.padding = EdgeInsets.zero,
this.autoAdjustScroll = false,
this.flexibleHeight = false,
this.backgroundColorCssCode = "#ffffff",
this.placeholder = "Edit text",
this.initialText,
this.printWebViewLog = false,
this.webViewTitle = "Editor",
this.useAndroidHybridComposition = false,
this.showLoadingWheel = false,
this.scaleFactor = 1.0,
this.webViewOptions,
}) : super(key: key) {
if (controller == null) {
this.controller = EditorController();
} else {
this.controller = controller;
}
if (autoAdjustScroll && flexibleHeight) {
assert(this.controller.scrollController != null);
}
}