code_forge
11.8.0, released 7 days ago by an unverified publisher
A powerful text editor widget for Flutter handling 1M+ lines with LSP and AI completion.
What it does
Provides a high-performance, VS Code-level text and code editor widget built using rope data structures and low-level rendering. It features 180+ syntax highlighting languages, code folding, multi-cursor support, Language Server Protocol (LSP) integration, and AI-powered ghost text code completion.
AI-written summary of version 11.7.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to embed a code editor or IDE-like interface inside a Flutter application.
- You require handling large text files with 1M+ lines smoothly.
- You need built-in LSP integration or AI code completion inside an editor widget.
Skip it when
- You only need a simple, single-line text input field.
- You are building a standard form and just need basic text wrapping or formatting.
Strengths
- Optimized rope data structure handles massive files efficiently without dropping frames.
- Built-in Language Server Protocol (LSP) client support over WebSockets and stdio.
- Extensive feature set including multi-cursor, syntax highlighting, and AI completion.
Weaknesses
- Complex setup required if configuring custom LSP servers or WebSocket proxies.
- Heavy package size due to numerous advanced dependencies and feature sets.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 8
Requires importing language and theme definitions from re_highlight. LSP servers require external binaries or WebSocket proxies (like lsp-ws-proxy) configured.
import 'package:flutter/material.dart';
import 'package:code_forge/code_forge.dart';
import 'package:re_highlight/languages/python.dart';
import 'package:re_highlight/styles/atom-one-dark.dart';
void main() => runApp(const MyApp());
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: CodeForge(
language: langPython,
editorTheme: atomOneDarkTheme,
),
),
);
}
}Alternatives
Packages that do the same job and could replace code_forge.
- re_editor
A lightweight text and code editor widget for Flutter with syntax highlighting and folding.
80Compare - code_editor
A Flutter code editor widget with syntax highlighting, custom themes, and file navigation.
82Compare - val_highlight_flutter
Flutter widgets for displaying and editing syntax-highlighted code.
80Compare - flutter_md
Fast Markdown parser and canvas renderer for Flutter with text selection and streaming.
82Compare
Works with
Packages commonly used together with code_forge: ones it builds on, ones built on it, and its own family.
- vector_mathcode_forge depends on itVector math library for 2D/3D/4D vectors, matrices, quaternions, and geometry.
- web_socket_channelcode_forge depends on itCross‑platform WebSocket channel wrapper for Dart
- material_uicode_forge depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- universal_iocode_forge depends on itCross-platform dart:io implementation with browser support for HttpClient and other APIs
- flutter_colorpickercode_forge depends on itHSV, HSL, RGB, and Material color picker widgets for Flutter applications.
- re_highlightcode_forge depends on itPowerful text syntax highlighting library translated from highlightjs.
- markdown_widgetcode_forge depends on itA simple and easy-to-use markdown rendering component for Flutter.