fix: add support for query schemes in example app (#279)

This commit is contained in:
Mathias Mogensen 2023-07-03 15:03:19 +02:00 • committed by GitHub
commit f6584b9f48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,9 +61,15 @@ class _HomePageState extends State<HomePage> {
void reassemble() {
super.reassemble();
_jsonString = Future.value(
jsonEncode(_editorState.document.toJson()),
);
_widgetBuilder = (context) => SimpleEditor(
jsonString: _jsonString,
onEditorStateChange: (editorState) {
_editorState = editorState;
_jsonString = Future.value(
jsonEncode(_editorState.document.toJson()),
);
},
);
}
@override
@ -74,6 +80,7 @@ class _HomePageState extends State<HomePage> {
drawer: _buildDrawer(context),
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
surfaceTintColor: Colors.transparent,
title: const Text('AppFlowy Editor'),
),
body: SafeArea(child: _buildBody(context)),