merge static method

Widget merge({
  1. Key? key,
  2. double? size,
  3. Color? color,
  4. Color? backgroundColor,
  5. double? width,
  6. double? offset,
  7. bool? rounded,
  8. DrivenSpinnerThemeData? data,
  9. required Widget child,
})

Creates an DrivenSpinnerTheme that controls the style of descendant widgets, and merges in the current DrivenSpinnerTheme, if any.

The style and child arguments must not be null.

Implementation

static Widget merge({
  Key? key,
  double? size,
  Color? color,
  Color? backgroundColor,
  double? width,
  double? offset,
  bool? rounded,
  DrivenSpinnerThemeData? data,
  required Widget child,
}) {
  return Builder(
    builder: (BuildContext context) {
      final parent = DrivenSpinnerTheme.of(context);
      return DrivenSpinnerTheme(
        key: key,
        data: parent.merge(data).copyWith(
              size: size,
              color: color,
              backgroundColor: backgroundColor,
              width: width,
              offset: offset,
              rounded: rounded,
            ),
        child: child,
      );
    },
  );
}