FPopoverMenuStyle.inherit constructor

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

Creates a FPopoverMenuStyle that inherits its properties.

Implementation

new inherit({
  required FColors colors,
  required FStyle style,
  required FTypography typography,
  required FHapticFeedback hapticFeedback,
  required bool touch,
}) : this(
       itemGroupStyle:
           .inherit(
             colors: colors,
             style: style,
             typography: typography,
             hapticFeedback: hapticFeedback,
             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),
                   contentDecoration: .delta([
                     .base(.shapeDelta(color: colors.card)),
                     .exact({.focused}, .shapeDelta(color: colors.secondary)),
                   ]),
                   focusedOutlineStyle: null,
                 ),
               ),
               .base(
                 .delta(
                   contentStyle: FItemContentStyle.inherit(
                     colors: colors,
                     typography: typography,
                     prefix: colors.foreground,
                     foreground: colors.foreground,
                     mutedForeground: colors.mutedForeground,
                     touch: touch,
                   ),
                   rawContentStyle: FRawItemContentStyle.inherit(
                     colors: colors,
                     typography: typography,
                     prefix: colors.foreground,
                     color: colors.foreground,
                     touch: touch,
                   ),
                 ),
               ),
             ]),
           ),
       tileGroupStyle: .inherit(colors: colors, style: style, typography: typography, hapticFeedback: hapticFeedback)
           .copyWith(
             tileStyles: .delta([
               .all(
                 .delta(
                   contentDecoration: .delta([
                     .exact({.focused}, .shapeDelta(color: colors.secondary)),
                   ]),
                   focusedOutlineStyle: () => null,
                 ),
               ),
               .base(
                 .delta(
                   contentStyle: .delta(
                     prefixIconStyle: FVariants.from(
                       IconThemeData(color: colors.foreground, size: typography.body.md.fontSize),
                       variants: {
                         [.disabled]: .delta(color: colors.disable(colors.foreground)),
                       },
                     ),
                   ),
                   rawContentStyle: .delta(
                     prefixIconStyle: FVariants.from(
                       IconThemeData(color: colors.foreground, size: typography.body.md.fontSize),
                       variants: {
                         [.disabled]: .delta(color: colors.disable(colors.foreground)),
                       },
                     ),
                   ),
                 ),
               ),
             ]),
           ),
       minWidth: 150,
       maxWidth: 250,
       hoverEnterDuration: const Duration(milliseconds: 150),
       menuMotion: const FPopoverMenuMotion(),
       hapticFeedback: hapticFeedback.mediumImpact,
       decoration: FPopoverStyle.inherit(colors: colors, style: style).decoration,
     );