combine static method
Implementation
static MExpandableThemeData combine(MExpandableThemeData? theme, MExpandableThemeData? defaults) {
if (defaults == null || defaults.isEmpty()) {
return theme ?? empty;
} else if (theme == null || theme.isEmpty()) {
return defaults;
} else if (theme.isFull()) {
return theme;
} else {
return MExpandableThemeData(
iconColor: theme.iconColor ?? defaults.iconColor,
useInkWell: theme.useInkWell ?? defaults.useInkWell,
inkWellBorderRadius: theme.inkWellBorderRadius ?? defaults.inkWellBorderRadius,
animationDuration: theme.animationDuration ?? defaults.animationDuration,
scrollAnimationDuration: theme.scrollAnimationDuration ?? defaults.scrollAnimationDuration,
crossFadePoint: theme.crossFadePoint ?? defaults.crossFadePoint,
fadeCurve: theme.fadeCurve ?? defaults.fadeCurve,
sizeCurve: theme.sizeCurve ?? defaults.sizeCurve,
alignment: theme.alignment ?? defaults.alignment,
headerAlignment: theme.headerAlignment ?? defaults.headerAlignment,
bodyAlignment: theme.bodyAlignment ?? defaults.bodyAlignment,
iconPlacement: theme.iconPlacement ?? defaults.iconPlacement,
tapHeaderToExpand: theme.tapHeaderToExpand ?? defaults.tapHeaderToExpand,
tapBodyToExpand: theme.tapBodyToExpand ?? defaults.tapBodyToExpand,
tapBodyToCollapse: theme.tapBodyToCollapse ?? defaults.tapBodyToCollapse,
hasIcon: theme.hasIcon ?? defaults.hasIcon,
iconSize: theme.iconSize ?? defaults.iconSize,
iconPadding: theme.iconPadding ?? defaults.iconPadding,
iconRotationAngle: theme.iconRotationAngle ?? defaults.iconRotationAngle,
expandIcon: theme.expandIcon ?? defaults.expandIcon,
collapseIcon: theme.collapseIcon ?? defaults.collapseIcon,
transition: theme.transition ?? defaults.transition,
clipBehavior: theme.clipBehavior ?? defaults.clipBehavior,
opacityCurve: theme.opacityCurve ?? defaults.opacityCurve,
);
}
}