Skip to content
pubscout

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
$ flutter pub add flutter_monaco
Source repository

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.