flutter_monaco
4.0.0, released 6 weeks ago by tomars.tech
Integrate Monaco Editor (VS Code) into Flutter apps via WebView.
WASM-readyUses material_ui
What it does
Embeds the Monaco Editor into Flutter applications on Android, iOS, macOS, Windows, and Web. Supports 100+ languages, syntax highlighting, themes, multi-document editing, and Language Server Protocol (LSP).
AI-written summary of version 4.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a full-featured code or text editor inside your Flutter desktop, mobile, or web application.
- You require syntax highlighting, IntelliSense, find/replace, or diff views for multiple languages.
Skip it when
- You only need a simple, single-line text input field.
- You are targeting Linux (Linux is not supported).
Strengths
- Brings the exact editor experience of VS Code to Flutter.
- Supports over 100 languages, multiple themes, and Language Server Protocol (LSP).
- Works across Android, iOS, macOS, Windows, and Web.
Weaknesses
- Linux is not supported.
- Relies on a WebView bridge for rendering the Monaco Editor.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- Yes (build_runner)
- Direct dependencies
- 7
Add flutter_monaco and material_ui to pubspec.yaml.
import 'package:flutter_monaco/flutter_monaco.dart';
import 'package:material_ui/material_ui.dart';
void main() {
runApp(
MaterialApp(
home: Scaffold(
body: MonacoEditor(
initialText: 'void main() { print("Hello"); }',
options: const EditorOptions(language: MonacoLanguage.dart),
),
),
),
);
}Works with
Packages commonly used together with flutter_monaco: ones it builds on, ones built on it, and its own family.
- webflutter_monaco depends on itLightweight bindings for browser APIs via JS interop
- path_providerflutter_monaco depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.
- freezed_annotationflutter_monaco depends on itAnnotations for the freezed code-generator.
- webview_flutterflutter_monaco depends on itFlutter plugin that embeds a native WebView widget.
- material_uiflutter_monaco depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- webview_flutter_windowsflutter_monaco depends on itA WebView2-powered webview plugin for Flutter on Windows.