merge static method

Widget merge({
  1. Key? key,
  2. Curve curve = Curves.linear,
  3. Duration duration = const Duration(milliseconds: 200),
  4. IconThemeData? data,
  5. required Widget child,
})

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

The child arguments must not be null.

Implementation

static Widget merge({
  Key? key,
  Curve curve = Curves.linear,
  Duration duration = const Duration(milliseconds: 200),
  IconThemeData? data,
  required Widget child,
}) {
  return Builder(
    builder: (BuildContext context) {
      final parent = IconTheme.of(context);
      return AnimatedIconTheme(
        key: key,
        curve: curve,
        duration: duration,
        data: parent.merge(data),
        child: child,
      );
    },
  );
}