copyWith static method
Widget
copyWith({
- Key? key,
- required Widget child,
- BoxConstraints? constraints,
- EdgeInsets? titlePadding,
- EdgeInsets? bodyPadding,
- Color? background,
- Color? barrierColor,
- TextStyle? titleTextStyle,
- TextAlign? bodyTextAlign,
- ImageFilter? imageFilter,
Makes a copy of the nearest DialogTheme overwriting selected fields.
Implementation
static Widget copyWith({
Key? key,
required Widget child,
BoxConstraints? constraints,
EdgeInsets? menuPadding,
double? menuSpacing,
EdgeInsets? titlePadding,
EdgeInsets? bodyPadding,
Color? background,
Color? barrierColor,
TextStyle? titleTextStyle,
TextAlign? bodyTextAlign,
ImageFilter? imageFilter,
}) {
return Builder(
key: key,
builder: (context) => DialogTheme(
data: DialogTheme.of(context).copyWith(
constraints: constraints,
menuPadding: menuPadding,
menuSpacing: menuSpacing,
titlePadding: titlePadding,
bodyPadding: bodyPadding,
background: background,
barrierColor: barrierColor,
titleTextStyle: titleTextStyle,
bodyTextAlign: bodyTextAlign,
imageFilter: imageFilter,
),
child: child,
),
);
}