copyWith method

NavNode<T> copyWith({
  1. NavNodeId? id,
  2. String? label,
  3. IconData? icon,
  4. List<NavNode<T>>? children,
  5. NavBadge? badge,
  6. List<String>? shortcut,
  7. T? value,
  8. bool? enabled,
})

Implementation

NavNode<T> copyWith({
  NavNodeId? id,
  String? label,
  IconData? icon,
  List<NavNode<T>>? children,
  NavBadge? badge,
  List<String>? shortcut,
  T? value,
  bool? enabled,
}) =>
    NavNode<T>(
      id: id ?? this.id,
      label: label ?? this.label,
      icon: icon ?? this.icon,
      children: children ?? this.children,
      badge: badge ?? this.badge,
      shortcut: shortcut ?? this.shortcut,
      value: value ?? this.value,
      enabled: enabled ?? this.enabled,
    );