FBadgeStyles.inherit constructor

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

Creates a FBadgeStyles that inherits its properties from the provided colorScheme, typography, and style.

Implementation

FBadgeStyles.inherit({required FColorScheme colorScheme, required FTypography typography, required FStyle style})
    : this(
        primary: FBadgeCustomStyle(
          backgroundColor: colorScheme.primary,
          borderColor: colorScheme.primary,
          borderWidth: style.borderWidth,
          contentStyle: FBadgeContentStyle(
            labelTextStyle: typography.sm.copyWith(color: colorScheme.primaryForeground, fontWeight: FontWeight.w600),
          ),
        ),
        secondary: FBadgeCustomStyle(
          backgroundColor: colorScheme.secondary,
          borderColor: colorScheme.secondary,
          borderWidth: style.borderWidth,
          contentStyle: FBadgeContentStyle(
            labelTextStyle: typography.sm.copyWith(
              color: colorScheme.secondaryForeground,
              fontWeight: FontWeight.w600,
            ),
          ),
        ),
        outline: FBadgeCustomStyle(
          backgroundColor: colorScheme.background,
          borderColor: colorScheme.border,
          borderWidth: style.borderWidth,
          contentStyle: FBadgeContentStyle(
            labelTextStyle: typography.sm.copyWith(
              color: colorScheme.foreground,
              fontWeight: FontWeight.w600,
            ),
          ),
        ),
        destructive: FBadgeCustomStyle(
          backgroundColor: colorScheme.destructive,
          borderColor: colorScheme.destructive,
          borderWidth: style.borderWidth,
          contentStyle: FBadgeContentStyle(
            labelTextStyle: typography.sm.copyWith(
              color: colorScheme.destructiveForeground,
              fontWeight: FontWeight.w600,
            ),
          ),
        ),
      );