copyWith method
Creates a new FlameTextStyle, preferring the properties of other
if present, falling back to the properties of this
.
Implementation
@override
BlockStyle copyWith(BlockStyle other) {
return BlockStyle(
margin: other._margin ?? _margin,
padding: other._padding ?? _padding,
background: other.background ?? background,
text: FlameTextStyle.merge(text, other.text),
textAlign: other.textAlign ?? textAlign,
);
}