FPopoverMenuStyle.inherit constructor

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

Creates a FPopoverMenuStyle that inherits its properties.

Implementation

FPopoverMenuStyle.inherit({
  required super.colors,
  required super.style,
  required FTypography typography,
  required bool touch,
}) : itemGroupStyle = .inherit(colors: colors, style: style, typography: typography, touch: touch).copyWith(
       decoration: .value(
         ShapeDecoration(
           color: colors.card,
           shape: RoundedSuperellipseBorder(
             side: BorderSide(color: colors.border, width: style.borderWidth),
             borderRadius: style.borderRadius.md,
           ),
         ),
       ),
       itemStyles: .delta([
         .all(
           .delta(
             backgroundColor: FVariants.all(colors.card),
             decoration: .delta([.base(.shapeDelta(color: colors.card))]),
           ),
         ),
         .base(
           .delta(
             contentStyle: FItemContentStyle.inherit(
               colors: colors,
               typography: typography,
               prefix: colors.foreground,
               foreground: colors.foreground,
               mutedForeground: colors.mutedForeground,
               suffixedPadding: FItemStyle.menuInsets(touch: touch).suffixedPadding,
               unsuffixedPadding: FItemStyle.menuInsets(touch: touch).unsuffixedPadding,
             ),
             rawItemContentStyle: FRawItemContentStyle.inherit(
               colors: colors,
               typography: typography,
               prefix: colors.foreground,
               color: colors.foreground,
               padding: FItemStyle.menuInsets(touch: touch).unsuffixedPadding,
             ),
           ),
         ),
       ]),
     ),
     tileGroupStyle = .inherit(colors: colors, style: style, typography: typography).copyWith(
       tileStyles: .delta([
         .base(
           .delta(
             contentStyle: .delta(
               prefixIconStyle: FVariants.from(
                 IconThemeData(color: colors.foreground, size: typography.md.fontSize),
                 variants: {
                   [.disabled]: .delta(color: colors.disable(colors.foreground)),
                 },
               ),
             ),
             rawItemContentStyle: .delta(
               prefixIconStyle: FVariants.from(
                 IconThemeData(color: colors.foreground, size: typography.md.fontSize),
                 variants: {
                   [.disabled]: .delta(color: colors.disable(colors.foreground)),
                 },
               ),
             ),
           ),
         ),
       ]),
     ),
     minWidth = 150,
     maxWidth = 250,
     hoverEnterDuration = const Duration(milliseconds: 150),
     menuMotion = const FPopoverMenuMotion(),
     hapticFeedback = style.hapticFeedback.mediumImpact,
     super.inherit();