RawEditor constructor

RawEditor({
  1. Key? key,
  2. required ZefyrController controller,
  3. required FocusNode focusNode,
  4. ClipboardController? clipboardController,
  5. ScrollController? scrollController,
  6. bool scrollable = true,
  7. EdgeInsetsGeometry padding = EdgeInsets.zero,
  8. bool autofocus = false,
  9. bool? showCursor,
  10. bool readOnly = false,
  11. bool enableInteractiveSelection = true,
  12. double? minHeight,
  13. double? maxHeight,
  14. double? scrollAreaMinHeight,
  15. bool expands = false,
  16. TextCapitalization textCapitalization = TextCapitalization.none,
  17. Brightness keyboardAppearance = Brightness.light,
  18. ValueChanged<Uri>? onLaunchUrl,
  19. required Color selectionColor,
  20. ScrollPhysics? scrollPhysics,
  21. ToolbarOptions toolbarOptions = const ToolbarOptions(copy: true, cut: true, paste: true, selectAll: true),
  22. bool enableSuggestions = true,
  23. CursorStyle? cursorStyle,
  24. bool showSelectionHandles = false,
  25. TextSelectionControls? selectionControls,
  26. 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);