merge<T extends FlameTextStyle> static method

T? merge<T extends FlameTextStyle>(
  1. T? style1,
  2. T? style2
)

Implementation

static T? merge<T extends FlameTextStyle>(T? style1, T? style2) {
  if (style1 == null) {
    return style2;
  } else if (style2 == null) {
    return style1;
  } else {
    assert(style1.runtimeType == style2.runtimeType);
    return style1.copyWith(style2) as T;
  }
}