HtmlToolbarOptions constructor

const HtmlToolbarOptions({
  1. List<String>? audioExtensions,
  2. List<Widget> customToolbarButtons = const [],
  3. List<int> customToolbarInsertionIndices = const [],
  4. List<Toolbar> defaultToolbarButtons = const [StyleButtons(), FontSettingButtons(fontSizeUnit: false), FontButtons(clearAll: false), ColorButtons(), ListButtons(listStyles: false), ParagraphButtons(textDirection: false, lineHeight: false, caseConverter: false), InsertButtons(video: false, audio: false, table: false, hr: false, otherFile: false)],
  5. List<String>? otherFileExtensions,
  6. List<String>? imageExtensions,
  7. bool initiallyExpanded = false,
  8. FutureOr<bool> linkInsertInterceptor(
    1. String,
    2. String,
    3. bool
    )?,
  9. FutureOr<bool> mediaLinkInsertInterceptor(
    1. String,
    2. InsertFileType
    )?,
  10. FutureOr<bool> mediaUploadInterceptor(
    1. PlatformFile,
    2. InsertFileType
    )?,
  11. FutureOr<bool> onButtonPressed(
    1. ButtonType,
    2. bool?,
    3. Function?
    )?,
  12. FutureOr<bool> onDropdownChanged(
    1. DropdownType,
    2. dynamic,
    3. void (
      1. dynamic
      )?
    )?,
  13. void onOtherFileLinkInsert(
    1. String
    )?,
  14. void onOtherFileUpload(
    1. PlatformFile
    )?,
  15. ToolbarType toolbarType = ToolbarType.nativeScrollable,
  16. ToolbarPosition toolbarPosition = ToolbarPosition.aboveEditor,
  17. List<String>? videoExtensions,
  18. int dropdownElevation = 8,
  19. Widget? dropdownIcon,
  20. Color? dropdownIconColor,
  21. double dropdownIconSize = 24,
  22. double dropdownItemHeight = kMinInteractiveDimension,
  23. Color? dropdownFocusColor,
  24. Color? dropdownBackgroundColor,
  25. DropdownMenuDirection? dropdownMenuDirection,
  26. double? dropdownMenuMaxHeight,
  27. BoxDecoration? dropdownBoxDecoration,
  28. Color? buttonColor,
  29. Color? buttonSelectedColor,
  30. Color? buttonFillColor,
  31. Color? buttonFocusColor,
  32. Color? buttonHighlightColor,
  33. Color? buttonHoverColor,
  34. Color? buttonSplashColor,
  35. Color? buttonBorderColor,
  36. Color? buttonSelectedBorderColor,
  37. BorderRadius? buttonBorderRadius,
  38. double? buttonBorderWidth,
  39. bool renderBorder = false,
  40. TextStyle? textStyle,
  41. Widget separatorWidget = const VerticalDivider(indent: 2, endIndent: 2, color: Colors.grey),
  42. bool renderSeparatorWidget = true,
  43. double toolbarItemHeight = 36,
  44. double gridViewHorizontalSpacing = 5,
  45. double gridViewVerticalSpacing = 5,
  46. bool allowImagePicking = true,
})

Implementation

const HtmlToolbarOptions({
  this.audioExtensions,
  this.customToolbarButtons = const [],
  this.customToolbarInsertionIndices = const [],
  this.defaultToolbarButtons = const [
    StyleButtons(),
    FontSettingButtons(fontSizeUnit: false),
    FontButtons(clearAll: false),
    ColorButtons(),
    ListButtons(listStyles: false),
    ParagraphButtons(textDirection: false, lineHeight: false, caseConverter: false),
    InsertButtons(video: false, audio: false, table: false, hr: false, otherFile: false),
  ],
  this.otherFileExtensions,
  this.imageExtensions,
  this.initiallyExpanded = false,
  this.linkInsertInterceptor,
  this.mediaLinkInsertInterceptor,
  this.mediaUploadInterceptor,
  this.onButtonPressed,
  this.onDropdownChanged,
  this.onOtherFileLinkInsert,
  this.onOtherFileUpload,
  this.toolbarType = ToolbarType.nativeScrollable,
  this.toolbarPosition = ToolbarPosition.aboveEditor,
  this.videoExtensions,
  this.dropdownElevation = 8,
  this.dropdownIcon,
  this.dropdownIconColor,
  this.dropdownIconSize = 24,
  this.dropdownItemHeight = kMinInteractiveDimension,
  this.dropdownFocusColor,
  this.dropdownBackgroundColor,
  this.dropdownMenuDirection,
  this.dropdownMenuMaxHeight,
  this.dropdownBoxDecoration,
  this.buttonColor,
  this.buttonSelectedColor,
  this.buttonFillColor,
  this.buttonFocusColor,
  this.buttonHighlightColor,
  this.buttonHoverColor,
  this.buttonSplashColor,
  this.buttonBorderColor,
  this.buttonSelectedBorderColor,
  this.buttonBorderRadius,
  this.buttonBorderWidth,
  this.renderBorder = false,
  this.textStyle,
  this.separatorWidget = const VerticalDivider(indent: 2, endIndent: 2, color: Colors.grey),
  this.renderSeparatorWidget = true,
  this.toolbarItemHeight = 36,
  this.gridViewHorizontalSpacing = 5,
  this.gridViewVerticalSpacing = 5,
  this.allowImagePicking = true,
});