copyWith method
- @useResult
- BoxDecoration? decoration,
- ImageFilter? backgroundFilter,
- EdgeInsetsGeometry? padding,
- FBottomNavigationBarItemStyle itemStyle()?,
Returns a copy of this FBottomNavigationBarStyle with the given properties replaced.
Where possible, it is strongly recommended to use the CLI to generate a style and directly modify the style.
decoration
The decoration.
backgroundFilter
An optional background filter. This only takes effect if the decoration
has a transparent or translucent
background color.
This is typically combined with a transparent/translucent background to create a glassmorphic effect.
Examples
// Blurred
ImageFilter.blur(sigmaX: 5, sigmaY: 5);
// Solid color
ColorFilter.mode(Colors.white, BlendMode.srcOver);
// Tinted
ColorFilter.mode(Colors.white.withValues(alpha: 0.5), BlendMode.srcOver);
// Blurred & tinted
ImageFilter.compose(
outer: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
inner: ColorFilter.mode(Colors.white.withValues(alpha: 0.5), BlendMode.srcOver),
);
padding
The padding. Defaults to EdgeInsets.all(5)
.
itemStyle
The item's style.
Implementation
@useResult
FBottomNavigationBarStyle copyWith({
BoxDecoration? decoration,
ImageFilter? backgroundFilter,
EdgeInsetsGeometry? padding,
FBottomNavigationBarItemStyle Function(FBottomNavigationBarItemStyle)? itemStyle,
}) => FBottomNavigationBarStyle(
decoration: decoration ?? this.decoration,
backgroundFilter: backgroundFilter ?? this.backgroundFilter,
padding: padding ?? this.padding,
itemStyle: itemStyle != null ? itemStyle(this.itemStyle) : this.itemStyle,
);