copyWith method
WindowTheme
copyWith({
- ValueGetter<
double?> ? titleBarHeight, - ValueGetter<
double?> ? resizeThickness,
Creates a copy of this theme with optionally replaced values.
Uses ValueGetter functions to allow nullable value replacement.
If a parameter is null, the current value is retained. If provided,
the getter function is called to retrieve the new value.
Parameters:
titleBarHeight: Optional getter for new title bar heightresizeThickness: Optional getter for new resize thickness
Returns a new WindowTheme instance with updated values.
Implementation
WindowTheme copyWith({
ValueGetter<double?>? titleBarHeight,
ValueGetter<double?>? resizeThickness,
}) {
return WindowTheme(
titleBarHeight:
titleBarHeight == null ? this.titleBarHeight : titleBarHeight(),
resizeThickness:
resizeThickness == null ? this.resizeThickness : resizeThickness(),
);
}