Remove the title editor if it cannot be stored

It just makes it confusing for the user otherwise.
This commit is contained in:
Vishesh Handa
2020-02-19 23:00:52 +01:00
parent d5176041be
commit a49876e3ee
3 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ class ChecklistEditorState extends State<ChecklistEditor>
floatingActionButton: buildFAB(widget, this),
body: Column(
children: <Widget>[
titleEditor,
if (widget.note.canHaveMetadata) titleEditor,
Expanded(child: FocusScope(child: checklistWidget)),
],
),

View File

@ -66,7 +66,7 @@ class MarkdownEditorState extends State<MarkdownEditor> implements EditorState {
child: SingleChildScrollView(
child: Column(
children: <Widget>[
_NoteTitleEditor(_titleTextController),
if (note.canHaveMetadata) _NoteTitleEditor(_titleTextController),
_NoteBodyEditor(
_textController,
autofocus: widget.autofocusOnEditor,

View File

@ -47,7 +47,7 @@ class NoteViewer extends StatelessWidget {
children: <Widget>[
if (note.created != null && showJournalHeader)
JournalEditorHeader(note),
if (showTitle)
if (showTitle && note.canHaveMetadata)
NoteTitleHeader(note.title),
Padding(
padding: const EdgeInsets.only(top: 8.0, bottom: 8.0),