SuperEditor constructor
SuperEditor({
- Key? key,
- FocusNode? focusNode,
- required DocumentEditor editor,
- DocumentComposer? composer,
- ScrollController? scrollController,
- GlobalKey<
State< ? documentLayoutKey,StatefulWidget> > - Stylesheet? stylesheet,
- List<
SingleColumnLayoutStylePhase> customStylePhases = const [], - List<
ComponentBuilder> ? componentBuilders, - SelectionStyles? selectionStyle,
- SuperEditorSelectionPolicies selectionPolicies = const SuperEditorSelectionPolicies(),
- TextInputSource? inputSource,
- SoftwareKeyboardController? softwareKeyboardController,
- SuperEditorImePolicies imePolicies = const SuperEditorImePolicies(),
- SuperEditorImeConfiguration imeConfiguration = const SuperEditorImeConfiguration(),
- DeltaTextInputClientDecorator? imeOverrides,
- List<
DocumentKeyboardAction> ? keyboardActions, - DocumentGestureMode? gestureMode,
- SuperEditorContentTapDelegateFactory? contentTapDelegateFactory = superEditorLaunchLinkTapHandlerFactory,
- Color? androidHandleColor,
- WidgetBuilder? androidToolbarBuilder,
- Color? iOSHandleColor,
- WidgetBuilder? iOSToolbarBuilder,
- CustomClipper<
Rect> createOverlayControlsClipper(- BuildContext overlayContext
- List<
DocumentLayerBuilder> documentOverlayBuilders = const [DefaultCaretOverlayBuilder()], - DebugPaintConfig debugPaint = const DebugPaintConfig(),
- bool autofocus = false,
- 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()];