copyWith method

M3EInteractionState copyWith({
  1. bool? hovered,
  2. bool? focused,
  3. bool? pressed,
  4. bool? dragged,
})

Returns a copy with the given fields replaced.

Implementation

M3EInteractionState copyWith({
  bool? hovered,
  bool? focused,
  bool? pressed,
  bool? dragged,
}) {
  return M3EInteractionState(
    hovered: hovered ?? this.hovered,
    focused: focused ?? this.focused,
    pressed: pressed ?? this.pressed,
    dragged: dragged ?? this.dragged,
  );
}