merge static method

Widget merge({
  1. Key? key,
  2. bool? dense,
  3. ShapeBorder? shape,
  4. ListTileStyle? style,
  5. Color? selectedColor,
  6. Color? iconColor,
  7. Color? textColor,
  8. EdgeInsetsGeometry? contentPadding,
  9. Color? tileColor,
  10. Color? selectedTileColor,
  11. bool? enableFeedback,
  12. double? verticalTitleGap,
  13. double? minHorizontalPadding,
  14. double? minLeadingHeight,
  15. required Widget child,
})

Creates a list tile theme that controls the color and style parameters for MongolListTiles, and merges in the current list tile theme, if any.

The child argument must not be null.

Implementation

static Widget merge({
  Key? key,
  bool? dense,
  ShapeBorder? shape,
  ListTileStyle? style,
  Color? selectedColor,
  Color? iconColor,
  Color? textColor,
  EdgeInsetsGeometry? contentPadding,
  Color? tileColor,
  Color? selectedTileColor,
  bool? enableFeedback,
  double? verticalTitleGap,
  double? minHorizontalPadding,
  double? minLeadingHeight,
  required Widget child,
}) {
  return Builder(
    builder: (BuildContext context) {
      final MongolListTileTheme parent = MongolListTileTheme.of(context);
      return MongolListTileTheme(
        key: key,
        dense: dense ?? parent.dense,
        shape: shape ?? parent.shape,
        style: style ?? parent.style,
        selectedColor: selectedColor ?? parent.selectedColor,
        iconColor: iconColor ?? parent.iconColor,
        textColor: textColor ?? parent.textColor,
        contentPadding: contentPadding ?? parent.contentPadding,
        tileColor: tileColor ?? parent.tileColor,
        selectedTileColor: selectedTileColor ?? parent.selectedTileColor,
        enableFeedback: enableFeedback ?? parent.enableFeedback,
        verticalTitleGap: verticalTitleGap ?? parent.verticalTitleGap,
        minHorizontalPadding:
            minHorizontalPadding ?? parent.minHorizontalPadding,
        minLeadingHeight: minLeadingHeight ?? parent.minLeadingHeight,
        child: child,
      );
    },
  );
}