flutter_blocknote_editor 0.0.23
flutter_blocknote_editor: ^0.0.23 copied to clipboard
A Flutter package (beta) that embeds BlockNoteJS inside a WebView with bidirectional communication, transaction batching, and undo/redo safety.
import 'package:flutter/material.dart';
import 'package:flutter_blocknote_editor/flutter_blocknote_editor.dart';
import 'pages/editor_example_page.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
// Pre-warm the editor WebView so modals and subsequent editor instances
// display instantly without loading delay.
BlockNoteEditorPool.instance.warmup(debugLogging: true);
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'BlockNote Editor Example',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
darkTheme: ThemeData(
colorScheme: ColorScheme.fromSeed(
seedColor: Colors.deepPurple,
brightness: Brightness.dark,
),
useMaterial3: true,
),
themeMode: ThemeMode.system,
home: const EditorExamplePage(),
);
}
}