merge<T> static method

Implementation

static MenuItemMaterialStateProperty<T>? merge<T>(MenuItemMaterialStateProperty<T>? a, MenuItemMaterialStateProperty<T>? b) {
  if (a == null) return b;
  else if (b == null) return a;
  else return a.copyWith(
    enabled: b.enabled,
    disabled: b.disabled,
    hovered: b.hovered,
    focused: b.focused,
    pressed: b.pressed
  );
}