monaco_editor 0.0.1+2
monaco_editor: ^0.0.1+2 copied to clipboard
A Flutter plugin for using the monaco editor in the WEB application
Monaco Editor #
This version is still a v0, it might have bugs
Currently only supporting web, this plugin is a wrapper around the Monaco Editor, a browser-based code editor.
Features #
- Supported functions
setTextgetTextonTextChanged
- Supported theme
vsvs-darkhc-lighthc-black
- Supported languages
plaintextjavascriptjsontypescripthtmlcssscsspythonphpjavaccppcsharpshellpowershelldockerfilemarkdownxmlyamlsqlgorubyswiftluarustkotlinperlobjectivecrfsharpgroovybatcoffeescripthandlebarsjadepugrazorschemetwigvbvbnetvueyamlplaintextdartyamlclojureelmhaxeocamlperl6racketreasonredschemeshelltclverilogvhdlwollokeiffelerlangfortranjuliamakefilematlabpowershellrrestructuredtextsassmalltalkstatatwigtsxvbscriptxmlyaml
Example #
class MyScreen extends StatefulWidget {
const MyScreen({super.key});
@override
State<MyScreen> createState() => _MyScreenState();
}
class _MyScreenState extends State<MyScreen> {
final controller = MonacoEditorController();
@override
void initState() {
controller.initialize(
MonacoEditorOptions(
language: MonacoLanguage.json,
theme: MonacoTheme.vsDark,
),
);
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
floatingActionButton: FloatingActionButton(
onPressed: () async {
print(await controller.getText());
},
child: const Icon(Icons.add),
),
body: MonacoEditorWidget(
controller: controller,
),
),
),
);
}
}