CodeForge constructor

const CodeForge({
  1. Key? key,
  2. CodeForgeController? controller,
  3. UndoRedoController? undoController,
  4. Map<String, TextStyle>? editorTheme,
  5. Mode? language,
  6. String? filePath,
  7. String? initialText,
  8. FocusNode? focusNode,
  9. ScrollController? verticalScrollController,
  10. ScrollController? horizontalScrollController,
  11. TextStyle? textStyle,
  12. EdgeInsets? innerPadding,
  13. CodeForgeKeyboardShortcuts keyboardShotcuts = const CodeForgeKeyboardShortcuts(),
  14. List<CustomCodeSnippet>? customCodeSnippets,
  15. bool readOnly = false,
  16. bool autoFocus = false,
  17. bool lineWrap = false,
  18. bool enableFolding = true,
  19. bool enableGuideLines = true,
  20. bool enableLocalSuggestions = false,
  21. bool enableKeyboardSuggestions = true,
  22. TextInputType keyboardType = TextInputType.multiline,
  23. TextDirection textDirection = TextDirection.ltr,
  24. int? tabSize,
  25. bool useSpaceAsTab = false,
  26. bool enableGutter = true,
  27. bool enableGutterDivider = false,
  28. bool deleteFoldRangeOnDeletingFirstLine = false,
  29. CodeSelectionStyle? selectionStyle,
  30. GutterStyle? gutterStyle,
  31. GutterBuilder? gutterBuilder,
  32. ScrollbarDecoration? scrollbarDecoration,
  33. TextStyle? ghostTextStyle,
  34. SuggestionStyle? suggestionStyle,
  35. HoverDetailsStyle? hoverDetailsStyle,
  36. MatchHighlightStyle? matchHighlightStyle,
  37. List<Mode> extraLanguages = const [],
  38. PreferredSizeWidget finderBuilder(
    1. BuildContext context,
    2. FindController findController
    )?,
  39. FindController? findController,
})

Creates a CodeForge code editor widget.

Implementation

const CodeForge({
  super.key,
  this.controller,
  this.undoController,
  this.editorTheme,
  this.language,
  this.filePath,
  this.initialText,
  this.focusNode,
  this.verticalScrollController,
  this.horizontalScrollController,
  this.textStyle,
  this.innerPadding,
  this.keyboardShotcuts = const CodeForgeKeyboardShortcuts(),
  this.customCodeSnippets,
  this.readOnly = false,
  this.autoFocus = false,
  this.lineWrap = false,
  this.enableFolding = true,
  this.enableGuideLines = true,
  this.enableLocalSuggestions = false,
  this.enableKeyboardSuggestions = true,
  this.keyboardType = TextInputType.multiline,
  this.textDirection = TextDirection.ltr,
  this.tabSize,
  this.useSpaceAsTab = false,
  this.enableGutter = true,
  this.enableGutterDivider = false,
  this.deleteFoldRangeOnDeletingFirstLine = false,
  this.selectionStyle,
  this.gutterStyle,
  this.gutterBuilder,
  this.scrollbarDecoration,
  this.ghostTextStyle,
  this.suggestionStyle,
  this.hoverDetailsStyle,
  this.matchHighlightStyle,
  this.extraLanguages = const [],
  this.finderBuilder,
  this.findController,
}) : _tabSize = tabSize ?? (useSpaceAsTab ? 2 : 1);