fix video attachment fullscreen

This commit is contained in:
Salvatore Giordano
2020-05-13 15:51:45 +02:00
parent 4dcdc457f4
commit a1a3cb177d
8 changed files with 142 additions and 69 deletions
+10 -1
View File
@@ -24,7 +24,16 @@ class StreamChatTheme extends InheritedWidget {
/// Use this method to get the current [StreamChatThemeData] instance
static StreamChatThemeData of(BuildContext context) {
return context.dependOnInheritedWidgetOfExactType<StreamChatTheme>().data;
final streamChatTheme =
context.dependOnInheritedWidgetOfExactType<StreamChatTheme>();
if (streamChatTheme == null) {
throw Exception(
'You must have a StreamChatTheme widget at the top of your widget tree',
);
}
return streamChatTheme.data;
}
}