copyWith method
FlagThemeData
copyWith({
- double? aspectRatio,
- BoxDecoration? decoration,
- DecorationPosition? decorationPosition,
- EdgeInsetsGeometry? padding,
- double? height,
- double? width,
- Widget? child,
override
Creates a copy of this FlagThemeData but with the given fields replaced with the new values.
aspectRatio: The aspect ratio of the flag.decoration: The decoration to paint behind the flag.decorationPosition: The position of the decoration.padding: The padding around the flag.height: The height of the flag.width: The width of the flag.child: A widget to display in the foreground of the flag.
Implementation
@override
FlagThemeData copyWith({
double? aspectRatio,
BoxDecoration? decoration,
DecorationPosition? decorationPosition,
EdgeInsetsGeometry? padding,
double? height,
double? width,
Widget? child,
}) => FlagThemeData(
aspectRatio: (aspectRatio?.isNegative ?? false)
? null
: (aspectRatio ?? _aspectRatio),
decoration: decoration ?? this.decoration,
decorationPosition: decorationPosition ?? this.decorationPosition,
padding: padding ?? this.padding,
height: (height?.isNegative ?? false) ? null : (height ?? this.height),
width: (width?.isNegative ?? false) ? null : (width ?? this.width),
child: child ?? this.child,
);