diff --git a/lib/pages/settings_multiple_emotes/settings_multiple_emotes_view.dart b/lib/pages/settings_multiple_emotes/settings_multiple_emotes_view.dart index 6a61b8df..bfb1431e 100644 --- a/lib/pages/settings_multiple_emotes/settings_multiple_emotes_view.dart +++ b/lib/pages/settings_multiple_emotes/settings_multiple_emotes_view.dart @@ -24,8 +24,11 @@ class MultipleEmotesSettingsView extends StatelessWidget { body: StreamBuilder( stream: room.onUpdate.stream, builder: (context, snapshot) { - final Map packs = - room.states['im.ponies.room_emotes'] ?? {}; + final packStateEvents = room.states['im.ponies.room_emotes']; + // we need to manually convert the map using Map.of, otherwise assigning null will throw a type error. + final Map packs = packStateEvents != null + ? Map.of(packStateEvents) + : {}; if (!packs.containsKey('')) { packs[''] = null; }