copyWith method
DrawerMenuItem
copyWith({
- String? title,
- String? route,
- bool? isVisible,
- String? iconUrl,
- bool isSelected = false,
- ValueNotifier<
bool> ? isExpanded, - List<
DrawerSubMenuMenuItem> ? subCategories,
Implementation
DrawerMenuItem copyWith({
String? menuId,
String? title,
String? route,
bool? isVisible,
String? iconUrl,
bool isSelected = false,
ValueNotifier<bool>? isExpanded,
List<DrawerSubMenuMenuItem>? subCategories,
}) {
return DrawerMenuItem(
title: title ?? this.title,
route: route ?? this.route,
isVisible: isVisible ?? this.isVisible,
iconUrl: iconUrl ?? this.iconUrl,
isSelected: isSelected,
isExpanded: isExpanded ?? this.isExpanded,
subCategories: subCategories ?? this.subCategories,
);
}