default editor should be updated without requiring a restart

This commit is contained in:
Vishesh Handa
2020-07-27 10:57:56 +02:00
parent 606b3d8c24
commit 73e3f7d5bc

View File

@ -64,11 +64,11 @@ class _FolderViewState extends State<FolderView> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
var container = Provider.of<StateContainer>(context); var container = Provider.of<StateContainer>(context);
final appState = container.appState; final appState = container.appState;
final defaultEditor = widget.notesFolder.config.defaultEditor;
var createButton = FloatingActionButton( var createButton = FloatingActionButton(
key: const ValueKey("FAB"), key: const ValueKey("FAB"),
onPressed: () => _newPost(context, defaultEditor), onPressed: () =>
_newPost(context, widget.notesFolder.config.defaultEditor),
child: const Icon(Icons.add), child: const Icon(Icons.add),
); );