mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +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,
|
style: titleTheme,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
);
|
);
|
||||||
Widget trailing;
|
Widget trailing = Container();
|
||||||
|
|
||||||
var date = note.modified ?? note.created;
|
var date = note.modified ?? note.created;
|
||||||
if (date != null) {
|
if (date != null) {
|
||||||
|
@ -39,7 +39,7 @@ class StandardView extends StatelessWidget {
|
|||||||
var titleTheme =
|
var titleTheme =
|
||||||
textTheme.title.copyWith(fontSize: textTheme.title.fontSize * 0.95);
|
textTheme.title.copyWith(fontSize: textTheme.title.fontSize * 0.95);
|
||||||
Widget titleWidget = Text(title, style: titleTheme);
|
Widget titleWidget = Text(title, style: titleTheme);
|
||||||
Widget trailing;
|
Widget trailing = Container();
|
||||||
|
|
||||||
var date = note.modified ?? note.created;
|
var date = note.modified ?? note.created;
|
||||||
if (date != null) {
|
if (date != null) {
|
||||||
|
Reference in New Issue
Block a user