copyWith method

DrawerMenuItem copyWith({
  1. String? menuId,
  2. String? title,
  3. String? route,
  4. bool? isVisible,
  5. String? iconUrl,
  6. bool isSelected = false,
  7. ValueNotifier<bool>? isExpanded,
  8. 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,
  );
}