From 538220f7bc6b60002e30498a2bc894e4a04c3152 Mon Sep 17 00:00:00 2001 From: Godwin Asuquo Date: Fri, 24 Feb 2023 14:50:19 +0200 Subject: [PATCH] Add assertion to avoid null --- .../desktop_widgets/desktop_sidebar/side_menu_item.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart b/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart index d84c864d7..42f4b0e4e 100644 --- a/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart +++ b/lib/src/screens/dashboard/desktop_widgets/desktop_sidebar/side_menu_item.dart @@ -7,7 +7,7 @@ class SideMenuItem extends StatelessWidget { this.imagePath, this.icon, this.isSelected = false, - }) : super(key: key); + }) : assert((icon != null && imagePath == null) || (icon == null && imagePath != null)); final void Function() onTap; final String? imagePath;