FAlertStyles.inherit constructor

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

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

Implementation

FAlertStyles.inherit({required FColorScheme colorScheme, required FTypography typography, required FStyle style})
    : primary = FAlertCustomStyle(
        padding: const EdgeInsets.fromLTRB(16, 12, 16, 12),
        titleTextStyle: typography.base.copyWith(
          fontWeight: FontWeight.w500,
          color: colorScheme.foreground,
          height: 1.2,
        ),
        subtitleTextStyle: typography.sm.copyWith(color: colorScheme.foreground),
        decoration: BoxDecoration(
          border: Border.all(color: colorScheme.border),
          borderRadius: style.borderRadius,
          color: colorScheme.background,
        ),
        icon: FAlertIconStyle(color: colorScheme.foreground),
      ),
      destructive = FAlertCustomStyle(
        padding: const EdgeInsets.fromLTRB(16, 12, 16, 12),
        titleTextStyle: typography.base.copyWith(
          fontWeight: FontWeight.w500,
          color: colorScheme.destructive,
          height: 1.2,
        ),
        subtitleTextStyle: typography.sm.copyWith(color: colorScheme.destructive),
        decoration: BoxDecoration(
          border: Border.all(color: colorScheme.destructive),
          borderRadius: style.borderRadius,
          color: colorScheme.background,
        ),
        icon: FAlertIconStyle(color: colorScheme.destructive),
      );