FDialogStyle.inherit constructor

FDialogStyle.inherit({
  1. required FStyle style,
  2. required FColors colors,
  3. required FTypography typography,
  4. required FHapticFeedback hapticFeedback,
  5. required bool touch,
})

Creates a FDialogStyle that inherits its properties.

Implementation

factory FDialogStyle.inherit({
  required FStyle style,
  required FColors colors,
  required FTypography typography,
  required FHapticFeedback hapticFeedback,
  required bool touch,
}) => .new(
  decoration: ShapeDecoration(
    shape: RoundedSuperellipseBorder(
      side: BorderSide(color: colors.border, width: style.borderWidth),
      borderRadius: style.borderRadius.md,
    ),
    color: colors.card,
  ),
  titleTextStyle: typography.display.md.copyWith(fontWeight: .w600, color: colors.foreground, height: 1.25),
  bodyTextStyle: touch
      ? typography.body.xs.copyWith(color: colors.mutedForeground)
      : typography.body.sm.copyWith(color: colors.mutedForeground),
  slidePressHapticFeedback: hapticFeedback.selectionClick,
);