SelectableMath constructor

const SelectableMath({
  1. Key? key,
  2. SyntaxTree? ast,
  3. bool autofocus = false,
  4. Color? cursorColor,
  5. Radius? cursorRadius,
  6. double cursorWidth = 2.0,
  7. double? cursorHeight,
  8. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  9. bool enableInteractiveSelection = true,
  10. FocusNode? focusNode,
  11. MathStyle mathStyle = MathStyle.display,
  12. double? logicalPpi,
  13. OnErrorFallback onErrorFallback = defaultOnErrorFallback,
  14. MathOptions? options,
  15. ParseException? parseException,
  16. bool showCursor = false,
  17. double? textScaleFactor,
  18. TextSelectionControls? textSelectionControls,
  19. TextStyle? textStyle,
  20. ToolbarOptions? toolbarOptions,
})

SelectableMath default constructor.

Requires either a parsed ast or a parseException.

See SelectableMath for its member documentation.

Implementation

const SelectableMath({
  Key? key,
  this.ast,
  this.autofocus = false,
  this.cursorColor,
  this.cursorRadius,
  this.cursorWidth = 2.0,
  this.cursorHeight,
  this.dragStartBehavior = DragStartBehavior.start,
  this.enableInteractiveSelection = true,
  this.focusNode,
  this.mathStyle = MathStyle.display,
  this.logicalPpi,
  this.onErrorFallback = defaultOnErrorFallback,
  this.options,
  this.parseException,
  this.showCursor = false,
  this.textScaleFactor,
  this.textSelectionControls,
  this.textStyle,
  ToolbarOptions? toolbarOptions,
})  : assert(ast != null || parseException != null),
      toolbarOptions = toolbarOptions ??
          const ToolbarOptions(
            selectAll: true,
            copy: true,
          ),
      super(key: key);