CodeForge.plainTextField constructor

CodeForge.plainTextField({
  1. Key? key,
  2. CodeForgeController? controller,
  3. UndoRedoController? undoController,
  4. Map<String, TextStyle>? editorTheme,
  5. Mode? language,
  6. CodeForgeFeatures codeForgeFeatures = const CodeForgeFeatures(enableGutter: false, enableGuideLines: false, enableFolding: false, enableMinimap: false, enableBracketPairMatching: false),
  7. CodeForgeStyling codeForgeStyling = const CodeForgeStyling(),
  8. String? filePath,
  9. String? fileUrl,
  10. String? initialText,
  11. String? fileUri,
  12. FocusNode? focusNode,
  13. ScrollController? verticalScrollController,
  14. ScrollController? horizontalScrollController,
  15. ScrollPhysics verticalScrollPhysics = const ClampingScrollPhysics(),
  16. EdgeInsets? innerPadding,
  17. int backgroundOpacity = 255,
  18. CodeForgeKeyboardShortcuts keyboardShotcuts = const CodeForgeKeyboardShortcuts(),
  19. List<CustomCodeSnippet>? customCodeSnippets,
  20. List<CustomContextMenu>? customContextMenuItems,
  21. int? tabSize,
  22. TextInputType keyboardType = TextInputType.multiline,
  23. TextDirection textDirection = TextDirection.ltr,
  24. ScrollbarDecoration? scrollbarDecoration,
  25. GutterBuilder? gutterBuilder,
  26. LspSuggestionBuilder? lspSuggestionBuilder,
  27. List<Mode> extraLanguages = const [],
  28. PreferredSizeWidget finderBuilder(
    1. BuildContext context,
    2. FindController findController
    )?,
  29. FindController? findController,
})

Use CodeForge as a powerful alternative to the defaultTextField, without any IDE features.

Implementation

CodeForge.plainTextField({
  super.key,
  this.controller,
  this.undoController,
  this.editorTheme,
  this.language,
  this.codeForgeFeatures = const CodeForgeFeatures(
    enableGutter: false,
    enableGuideLines: false,
    enableFolding: false,
    enableMinimap: false,
    enableBracketPairMatching: false,
  ),
  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);