CodeForge constructor
CodeForge({
- Key? key,
- CodeForgeController? controller,
- UndoRedoController? undoController,
- Map<
String, TextStyle> ? editorTheme, - Mode? language,
- CodeForgeFeatures codeForgeFeatures = const CodeForgeFeatures(),
- CodeForgeStyling codeForgeStyling = const CodeForgeStyling(),
- String? filePath,
- String? fileUrl,
- String? initialText,
- String? fileUri,
- FocusNode? focusNode,
- ScrollController? verticalScrollController,
- ScrollController? horizontalScrollController,
- ScrollPhysics verticalScrollPhysics = const ClampingScrollPhysics(),
- EdgeInsets? innerPadding,
- int backgroundOpacity = 255,
- CodeForgeKeyboardShortcuts keyboardShotcuts = const CodeForgeKeyboardShortcuts(),
- List<
CustomCodeSnippet> ? customCodeSnippets, - List<
CustomContextMenu> ? customContextMenuItems, - int? tabSize,
- TextInputType keyboardType = TextInputType.multiline,
- TextDirection textDirection = TextDirection.ltr,
- ScrollbarDecoration? scrollbarDecoration,
- GutterBuilder? gutterBuilder,
- LspSuggestionBuilder? lspSuggestionBuilder,
- List<
Mode> extraLanguages = const [], - PreferredSizeWidget finderBuilder(
- BuildContext context,
- FindController findController
- FindController? findController,
Creates a CodeForge code editor widget.
Implementation
CodeForge({
super.key,
this.controller,
this.undoController,
this.editorTheme,
this.language,
this.codeForgeFeatures = const CodeForgeFeatures(),
this.codeForgeStyling = const CodeForgeStyling(),
this.filePath,
this.fileUrl,
this.initialText,
this.fileUri,
this.focusNode,
this.verticalScrollController,
this.horizontalScrollController,
this.verticalScrollPhysics = const ClampingScrollPhysics(),
this.innerPadding,
this.backgroundOpacity = 255,
this.keyboardShotcuts = const CodeForgeKeyboardShortcuts(),
this.customCodeSnippets,
this.customContextMenuItems,
this.tabSize,
this.keyboardType = TextInputType.multiline,
this.textDirection = TextDirection.ltr,
this.scrollbarDecoration,
this.gutterBuilder,
this.lspSuggestionBuilder,
this.extraLanguages = const [],
this.finderBuilder,
this.findController,
}) : _tabSize = tabSize ?? (codeForgeFeatures.useSpaceAsTab ? 2 : 1);