Nullability fixes
This commit is contained in:
parent
236301275d
commit
c66b20a460
|
@ -41,9 +41,9 @@ extension on CommentSortType {
|
|||
|
||||
class CommentTree {
|
||||
CommentView comment;
|
||||
List<CommentTree> children;
|
||||
List<CommentTree> children = [];
|
||||
|
||||
CommentTree(this.comment, [this.children = const []]);
|
||||
CommentTree(this.comment);
|
||||
|
||||
/// takes raw linear comments and turns them into a CommentTree
|
||||
static List<CommentTree> fromList(List<CommentView> comments) {
|
||||
|
|
|
@ -56,7 +56,7 @@ class InstancePage extends HookWidget {
|
|||
padding: const EdgeInsets.all(8),
|
||||
child: Text('ERROR: ${siteSnap.error}'),
|
||||
)
|
||||
] else if (siteSnap.data!.siteView == null)
|
||||
] else if (siteSnap.hasData && siteSnap.data!.siteView == null)
|
||||
const Text('ERROR')
|
||||
else
|
||||
const CircularProgressIndicator(semanticsLabel: 'loading')
|
||||
|
|
Loading…
Reference in New Issue