resolve method

ChipStyle resolve({
  1. ChipVariant? variant,
  2. ChipSeverity? severity,
})

Return ChipStyle that depends on variant and severity

Implementation

ChipStyle resolve({ChipVariant? variant, ChipSeverity? severity}) {
  variant ??= style.variant;
  severity ??= style.severity;
  return const ChipStyle()
      .merge(style)
      .merge(variantStyle[variant])
      .merge(severityStyle[severity]?[variant]);
}