merge static method

Widget merge({
  1. Key? key,
  2. Curve? curve,
  3. Duration? duration,
  4. SheetStyle? style,
  5. SheetStyleByVariant? variantStyle,
  6. SheetStyleByVariant? dangerStyle,
  7. SheetStyleByVariant? warningStyle,
  8. SheetStyleByVariant? successStyle,
  9. SheetStyleByVariant? infoStyle,
  10. SheetThemeData? data,
  11. 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,
      );
    },
  );
}