FolderViews: Never let a Row have a null widget

Otherwise we get an exception. This happens when a note has not loaded
and we're trying to render it. Ideally we should handle those cases with
some kind of animation instead of the current approach.
This commit is contained in:
Vishesh Handa
2020-03-06 19:25:00 +01:00
parent 2f9f8b3e73
commit d7265ec69b
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class CompactView extends StatelessWidget {
style: titleTheme,
overflow: TextOverflow.ellipsis,
);
Widget trailing;
Widget trailing = Container();
var date = note.modified ?? note.created;
if (date != null) {

View File

@ -39,7 +39,7 @@ class StandardView extends StatelessWidget {
var titleTheme =
textTheme.title.copyWith(fontSize: textTheme.title.fontSize * 0.95);
Widget titleWidget = Text(title, style: titleTheme);
Widget trailing;
Widget trailing = Container();
var date = note.modified ?? note.created;
if (date != null) {