diff --git a/lib/src/components/organisms/info_drawer.dart b/lib/src/components/organisms/info_drawer.dart index 41066587..54ae43c0 100644 --- a/lib/src/components/organisms/info_drawer.dart +++ b/lib/src/components/organisms/info_drawer.dart @@ -19,8 +19,7 @@ class SelectedDetailDrawer extends HookWidget { @override Widget build(BuildContext context) { final detail = useProvider(selectedDetailProvider).state; - - final selected = detail.release; + final selected = detail?.release; void onClose() { // Close drawer if its not large layout diff --git a/lib/src/modules/common/app_shell.dart b/lib/src/modules/common/app_shell.dart index b49272ad..0b2457a6 100644 --- a/lib/src/modules/common/app_shell.dart +++ b/lib/src/modules/common/app_shell.dart @@ -48,7 +48,7 @@ class AppShell extends HookWidget { useValueChanged(selectedInfo, (_, __) { if (_scaffoldKey.currentState == null) return; final isOpen = _scaffoldKey.currentState.isEndDrawerOpen; - final hasInfo = selectedInfo.release != null; + final hasInfo = selectedInfo?.release != null; // Open drawer if not large layout and its not open if (hasInfo && !isOpen) {