RawEditor constructor
RawEditor({
- Key? key,
- required ZefyrController controller,
- required FocusNode focusNode,
- ClipboardController? clipboardController,
- ScrollController? scrollController,
- bool scrollable = true,
- EdgeInsetsGeometry padding = EdgeInsets.zero,
- bool autofocus = false,
- bool? showCursor,
- bool readOnly = false,
- bool enableInteractiveSelection = true,
- double? minHeight,
- double? maxHeight,
- double? scrollAreaMinHeight,
- bool expands = false,
- TextCapitalization textCapitalization = TextCapitalization.none,
- Brightness keyboardAppearance = Brightness.light,
- ValueChanged<
Uri> ? onLaunchUrl, - required Color selectionColor,
- ScrollPhysics? scrollPhysics,
- ToolbarOptions toolbarOptions = const ToolbarOptions(copy: true, cut: true, paste: true, selectAll: true),
- bool enableSuggestions = true,
- CursorStyle? cursorStyle,
- bool showSelectionHandles = false,
- TextSelectionControls? selectionControls,
- ZefyrEmbedBuilder embedBuilder = defaultZefyrEmbedBuilder,
Implementation
RawEditor({
Key? key,
required this.controller,
required this.focusNode,
this.clipboardController,
this.scrollController,
this.scrollable = true,
this.padding = EdgeInsets.zero,
this.autofocus = false,
bool? showCursor,
this.readOnly = false,
this.enableInteractiveSelection = true,
this.minHeight,
this.maxHeight,
this.scrollAreaMinHeight,
this.expands = false,
this.textCapitalization = TextCapitalization.none,
this.keyboardAppearance = Brightness.light,
this.onLaunchUrl,
required this.selectionColor,
this.scrollPhysics,
this.toolbarOptions = const ToolbarOptions(
copy: true,
cut: true,
paste: true,
selectAll: true,
),
this.enableSuggestions = true,
this.cursorStyle,
this.showSelectionHandles = false,
this.selectionControls,
this.embedBuilder = defaultZefyrEmbedBuilder,
}) : assert(scrollable || scrollController != null),
assert(maxHeight == null || maxHeight > 0),
assert(minHeight == null || minHeight >= 0),
assert(scrollAreaMinHeight == null || scrollAreaMinHeight >= 0),
assert(
(maxHeight == null) ||
(minHeight == null) ||
(maxHeight >= minHeight),
'minHeight can\'t be greater than maxHeight',
),
// keyboardType = keyboardType ?? TextInputType.multiline,
showCursor = showCursor ?? !readOnly,
super(key: key);