copyWith method
Creates a copy of this theme but with the given fields replaced.
Implementation
MenuTheme copyWith({
ValueGetter<EdgeInsets?>? itemPadding,
ValueGetter<Offset?>? subMenuOffset,
}) {
return MenuTheme(
itemPadding: itemPadding == null ? this.itemPadding : itemPadding(),
subMenuOffset:
subMenuOffset == null ? this.subMenuOffset : subMenuOffset(),
);
}