merge static method
Widget
merge({
- Key? key,
- Curve? curve,
- Duration? duration,
- SheetStyle? style,
- SheetStyleByVariant? variantStyle,
- SheetStyleByVariant? dangerStyle,
- SheetStyleByVariant? warningStyle,
- SheetStyleByVariant? successStyle,
- SheetStyleByVariant? infoStyle,
- SheetThemeData? data,
- required Widget child,
Creates an SheetTheme that controls the style of descendant widgets, and merges in the current SheetTheme, if any.
The style
and child
arguments must not be null.
Implementation
static Widget merge({
Key? key,
Curve? curve,
Duration? duration,
SheetStyle? style,
SheetStyleByVariant? variantStyle,
SheetStyleByVariant? dangerStyle,
SheetStyleByVariant? warningStyle,
SheetStyleByVariant? successStyle,
SheetStyleByVariant? infoStyle,
SheetThemeData? data,
required Widget child,
}) {
return Builder(
builder: (BuildContext context) {
final parent = SheetTheme.of(context);
return SheetTheme(
key: key,
data: parent.merge(data).copyWith(
curve: curve,
duration: duration,
style: style,
variantStyle: variantStyle,
dangerStyle: dangerStyle,
warningStyle: warningStyle,
successStyle: successStyle,
infoStyle: infoStyle,
),
child: child,
);
},
);
}