copyWith method
Item
copyWith(
{ - String? type,
- int? count,
- int? damage,
- Slot? slot,
- int? model,
- int? hideFlags,
- TextComponent? name,
- List<TextComponent>? lore,
- Map<String, dynamic>? nbt,
})
Implementation
Item copyWith({
String? type,
int? count,
int? damage,
Slot? slot,
int? model,
int? hideFlags,
TextComponent? name,
List<TextComponent>? lore,
Map<String, dynamic>? nbt,
}) {
final t = tag != null
? tag!.deepCopy().cast<String, dynamic>()
: <String, dynamic>{};
_checkTags(model, type, hideFlags, name, lore, nbt, t);
return Item(
type ?? this.type,
count: count ?? this.count,
damage: damage ?? this.damage,
slot: slot ?? this.slot,
nbt: t,
);
}