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