merge static method

Widget merge({
  1. Key? key,
  2. Curve? curve,
  3. Duration? duration,
  4. ToggleIconStyle? style,
  5. ToggleIconThemeData? data,
  6. required Widget child,
})

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

The child arguments must not be null.

Implementation

static Widget merge({
  Key? key,
  Curve? curve,
  Duration? duration,
  ToggleIconStyle? style,
  ToggleIconThemeData? data,
  required Widget child,
}) {
  return Builder(
    builder: (BuildContext context) {
      final parent = ToggleIconTheme.of(context);
      return ToggleIconTheme(
        key: key,
        data: parent.merge(data).copyWith(
              curve: curve,
              duration: duration,
              style: style,
            ),
        child: child,
      );
    },
  );
}