merge static method

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

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

The child arguments must not be null.

Implementation

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