SContextMenuTheme class

Theme and styling configuration for SContextMenu.

You can provide an instance to the theme: parameter of SContextMenu to override colors, radii, elevation/shadow, blur, padding and arrow style. Missing values fall back to adaptive defaults derived from current ThemeData/CupertinoTheme.

Constructors

SContextMenuTheme({double panelBorderRadius = 8, double panelBlurSigma = 20, EdgeInsets panelPadding = const EdgeInsets.symmetric(vertical: 0), Color? panelBackgroundColor, Color? panelBorderColor, List<BoxShadow>? panelShadows, ArrowShape arrowShape = ArrowShape.smallTriangle, double arrowBaseWidth = 10, double arrowCornerRadius = 4, double arrowTipGap = 2, double arrowMaxLength = 2, double arrowTipRoundness = 5, Duration showDuration = const Duration(milliseconds: 200), Duration hideDuration = const Duration(milliseconds: 150), Color? iconColor, Color? destructiveColor, Color? hoverColor, Color? arrowColor})
const

Properties

arrowBaseWidth double
final
arrowColor Color?
Color for the arrow pointer. Falls back to panel background color. Color for the arrow pointer. Falls back to panel background color.
final
arrowCornerRadius double
final
arrowMaxLength double
final
arrowShape ArrowShape
final
arrowTipGap double
final
arrowTipRoundness double
final
destructiveColor Color?
Color for destructive menu item icons and text. Falls back to red.
final
hashCode int
The hash code for this object.
no setterinherited
hideDuration Duration
final
hoverColor Color?
Background color for hovered/pressed menu items.
final
iconColor Color?
Color for menu item icons and text. Falls back to theme primary color.
final
panelBackgroundColor Color?
final
panelBlurSigma double
final
panelBorderColor Color?
final
panelBorderRadius double
final
panelPadding EdgeInsets
final
panelShadows List<BoxShadow>?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDuration Duration
final

Methods

copyWith({double? panelBorderRadius, double? panelBlurSigma, EdgeInsets? panelPadding, Color? panelBackgroundColor, Color? panelBorderColor, List<BoxShadow>? panelShadows, ArrowShape? arrowShape, double? arrowBaseWidth, double? arrowCornerRadius, double? arrowTipGap, double? arrowMaxLength, double? arrowTipRoundness, Duration? showDuration, Duration? hideDuration, Color? iconColor, Color? destructiveColor, Color? hoverColor, Color? arrowColor}) SContextMenuTheme
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveArrowColor(Brightness brightness) Color
Resolve arrow color. Falls back to panel background color.
resolveBackground(Brightness brightness) Color
Resolve a background color if none provided based on brightness.
resolveBorder(Brightness brightness) Color
resolveDestructiveColor() Color
Resolve destructive color. Falls back to red.
resolveHoverColor(bool isDark) Color
Resolve hover background color based on brightness.
resolveIconColor(Color fallbackPrimary) Color
Resolve icon/text color. Falls back to primary color from context.
resolveShadows(Brightness brightness) List<BoxShadow>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited