combine static method
Implementation
static ExpandableThemeData combine(
ExpandableThemeData? theme, ExpandableThemeData? 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 ExpandableThemeData(
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,
);
}
}