HtmlEditor constructor

HtmlEditor({
  1. Key? key,
  2. EditorController? controller,
  3. dynamic onChange(
    1. String content,
    2. double height
    )?,
  4. dynamic onFocus()?,
  5. dynamic onBlur()?,
  6. double minHeight = 300.0,
  7. EdgeInsets padding = EdgeInsets.zero,
  8. bool autoAdjustScroll = false,
  9. bool flexibleHeight = false,
  10. String backgroundColorCssCode = "#ffffff",
  11. String placeholder = "Edit text",
  12. String? initialText,
  13. bool printWebViewLog = false,
  14. String webViewTitle = "Editor",
  15. bool useAndroidHybridComposition = false,
  16. bool showLoadingWheel = false,
  17. double scaleFactor = 1.0,
  18. 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);
  }
}