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})
    : this(
        primary: FAlertCustomStyle(
          iconColor: colorScheme.foreground,
          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,
          ),
        ),
        destructive: FAlertCustomStyle(
          iconColor: colorScheme.destructive,
          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,
          ),
        ),
      );