mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 09:47:35 +08:00
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:
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user