FDialogStyle.inherit constructor

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

Creates a FDialogStyle that inherits its properties.

Implementation

factory FDialogStyle.inherit({required FStyle style, required FColors colors, required FTypography typography}) {
  final title = typography.lg.copyWith(fontWeight: FontWeight.w600, color: colors.foreground);
  final body = typography.sm.copyWith(color: colors.mutedForeground);
  return FDialogStyle(
    decoration: BoxDecoration(borderRadius: style.borderRadius, color: colors.background),
    horizontalStyle: FDialogContentStyle(
      titleTextStyle: title,
      bodyTextStyle: body,
      padding: const EdgeInsets.symmetric(horizontal: 25, vertical: 25),
      actionSpacing: 7,
    ),
    verticalStyle: FDialogContentStyle(
      titleTextStyle: title,
      bodyTextStyle: body,
      padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 25),
      actionSpacing: 8,
    ),
  );
}