Add assertion to avoid null

This commit is contained in:
Godwin Asuquo 2023-02-24 14:50:19 +02:00
parent 770ed710d7
commit 538220f7bc

View file

@ -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;