FAlertStyles.inherit constructor

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

Creates a FAlertStyles that inherits its properties.

Implementation

FAlertStyles.inherit({required FColors colors, required FTypography typography, required FStyle style})
  : this(
      primary: FAlertStyle(
        iconStyle: IconThemeData(color: colors.foreground, size: 20),
        titleTextStyle: typography.base.copyWith(fontWeight: FontWeight.w500, color: colors.foreground, height: 1.2),
        subtitleTextStyle: typography.sm.copyWith(color: colors.foreground),
        decoration: BoxDecoration(
          border: Border.all(color: colors.border),
          borderRadius: style.borderRadius,
          color: colors.background,
        ),
      ),
      destructive: FAlertStyle(
        iconStyle: IconThemeData(color: colors.destructive, size: 20),
        titleTextStyle: typography.base.copyWith(fontWeight: FontWeight.w500, color: colors.destructive, height: 1.2),
        subtitleTextStyle: typography.sm.copyWith(color: colors.destructive),
        decoration: BoxDecoration(
          border: Border.all(color: colors.destructive),
          borderRadius: style.borderRadius,
          color: colors.background,
        ),
      ),
    );