SuperEditor constructor

SuperEditor({
  1. Key? key,
  2. FocusNode? focusNode,
  3. required DocumentEditor editor,
  4. DocumentComposer? composer,
  5. ScrollController? scrollController,
  6. GlobalKey<State<StatefulWidget>>? documentLayoutKey,
  7. Stylesheet? stylesheet,
  8. List<SingleColumnLayoutStylePhase> customStylePhases = const [],
  9. List<ComponentBuilder>? componentBuilders,
  10. SelectionStyles? selectionStyle,
  11. SuperEditorSelectionPolicies selectionPolicies = const SuperEditorSelectionPolicies(),
  12. TextInputSource? inputSource,
  13. SoftwareKeyboardController? softwareKeyboardController,
  14. SuperEditorImePolicies imePolicies = const SuperEditorImePolicies(),
  15. SuperEditorImeConfiguration imeConfiguration = const SuperEditorImeConfiguration(),
  16. DeltaTextInputClientDecorator? imeOverrides,
  17. List<DocumentKeyboardAction>? keyboardActions,
  18. DocumentGestureMode? gestureMode,
  19. SuperEditorContentTapDelegateFactory? contentTapDelegateFactory = superEditorLaunchLinkTapHandlerFactory,
  20. Color? androidHandleColor,
  21. WidgetBuilder? androidToolbarBuilder,
  22. Color? iOSHandleColor,
  23. WidgetBuilder? iOSToolbarBuilder,
  24. CustomClipper<Rect> createOverlayControlsClipper(
    1. BuildContext overlayContext
    )?,
  25. List<DocumentLayerBuilder> documentOverlayBuilders = const [DefaultCaretOverlayBuilder()],
  26. DebugPaintConfig debugPaint = const DebugPaintConfig(),
  27. bool autofocus = false,
  28. MagnifierAndToolbarController? overlayController,
})

Creates a Super Editor with common (but configurable) defaults for visual components, text styles, and user interaction.

Implementation

SuperEditor({
  super.key,
  this.focusNode,
  required this.editor,
  this.composer,
  this.scrollController,
  this.documentLayoutKey,
  Stylesheet? stylesheet,
  this.customStylePhases = const [],
  List<ComponentBuilder>? componentBuilders,
  SelectionStyles? selectionStyle,
  this.selectionPolicies = const SuperEditorSelectionPolicies(),
  this.inputSource,
  this.softwareKeyboardController,
  this.imePolicies = const SuperEditorImePolicies(),
  this.imeConfiguration = const SuperEditorImeConfiguration(),
  this.imeOverrides,
  List<DocumentKeyboardAction>? keyboardActions,
  this.gestureMode,
  this.contentTapDelegateFactory = superEditorLaunchLinkTapHandlerFactory,
  this.androidHandleColor,
  this.androidToolbarBuilder,
  this.iOSHandleColor,
  this.iOSToolbarBuilder,
  this.createOverlayControlsClipper,
  this.documentOverlayBuilders = const [DefaultCaretOverlayBuilder()],
  this.debugPaint = const DebugPaintConfig(),
  this.autofocus = false,
  this.overlayController,
})  : stylesheet = stylesheet ?? defaultStylesheet,
      selectionStyles = selectionStyle ?? defaultSelectionStyle,
      keyboardActions = keyboardActions ?? defaultKeyboardActions,
      componentBuilders = componentBuilders != null
          ? [...componentBuilders, const UnknownComponentBuilder()]
          : [...defaultComponentBuilders, const UnknownComponentBuilder()];