copyWith<T> method
Creates a copy with the given fields replaced with the new values.
Implementation
InheritedProperties copyWith<T>({
InheritedProperties? parent,
TextStyle? style,
T? value,
}) {
var newStyle = _style;
if (style != null) {
if (style.inherit) {
newStyle = newStyle.merge(style);
} else {
newStyle = style;
}
}
return InheritedProperties._(
parent ?? this.parent,
value != null ? [...values.where((e) => e is! T), value] : values,
newStyle,
);
}