From 8ae77215b53e00846d74eb7fabe62f056c0877f6 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Thu, 19 Aug 2021 10:22:05 +0200 Subject: [PATCH] refactor: SpaceChild and SpaceParent null safe --- lib/src/utils/space_child.dart | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/src/utils/space_child.dart b/lib/src/utils/space_child.dart index 210522ee..5d977002 100644 --- a/lib/src/utils/space_child.dart +++ b/lib/src/utils/space_child.dart @@ -1,4 +1,3 @@ -// @dart=2.9 /* * Famedly Matrix SDK * Copyright (C) 2019, 2020, 2021 Famedly GmbH @@ -23,9 +22,9 @@ import '../event.dart'; class SpaceChild { final String roomId; - final List via; + final List? via; final String order; - final bool suggested; + final bool? suggested; SpaceChild.fromState(Event state) : assert(state.type == EventTypes.spaceChild), @@ -37,8 +36,8 @@ class SpaceChild { class SpaceParent { final String roomId; - final List via; - final bool canonical; + final List? via; + final bool? canonical; SpaceParent.fromState(Event state) : assert(state.type == EventTypes.spaceParent),