FBadgeStyles.inherit constructor

FBadgeStyles.inherit({
  1. required FColors colors,
  2. required FTypography typography,
  3. required FStyle style,
})

Creates a FBadgeStyles that inherits its properties.

Implementation

FBadgeStyles.inherit({required FColors colors, required FTypography typography, required FStyle style})
  : this(
      primary: FBadgeStyle(
        decoration: BoxDecoration(color: colors.primary, borderRadius: FBadgeStyles.defaultRadius),
        contentStyle: FBadgeContentStyle(
          labelTextStyle: typography.sm.copyWith(color: colors.primaryForeground, fontWeight: FontWeight.w600),
        ),
      ),
      secondary: FBadgeStyle(
        decoration: BoxDecoration(color: colors.secondary, borderRadius: FBadgeStyles.defaultRadius),
        contentStyle: FBadgeContentStyle(
          labelTextStyle: typography.sm.copyWith(color: colors.secondaryForeground, fontWeight: FontWeight.w600),
        ),
      ),
      outline: FBadgeStyle(
        decoration: BoxDecoration(
          border: Border.all(color: colors.border, width: style.borderWidth),
          borderRadius: FBadgeStyles.defaultRadius,
        ),
        contentStyle: FBadgeContentStyle(
          labelTextStyle: typography.sm.copyWith(color: colors.foreground, fontWeight: FontWeight.w600),
        ),
      ),
      destructive: FBadgeStyle(
        decoration: BoxDecoration(color: colors.destructive, borderRadius: FBadgeStyles.defaultRadius),
        contentStyle: FBadgeContentStyle(
          labelTextStyle: typography.sm.copyWith(color: colors.destructiveForeground, fontWeight: FontWeight.w600),
        ),
      ),
    );