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({bool showArrow = false, double panelBorderRadius = 12, double panelBlurSigma = 14, EdgeInsets panelPadding = const EdgeInsets.symmetric(vertical: 6), Color? panelBackgroundColor, Color? panelBorderColor, List<
BoxShadow> ? panelShadows, ArrowShape arrowShape = ArrowShape.curved, double arrowBaseWidth = 12, double arrowCornerRadius = 6, double arrowTipGap = 2, double arrowMaxLength = 3, double arrowTipRoundness = 2, Duration showDuration = const Duration(milliseconds: 170), Duration hideDuration = const Duration(milliseconds: 120), 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
- showArrow → bool
-
Whether to render the arrow pointer.
final
- showDuration → Duration
-
final
Methods
-
copyWith(
{bool? showArrow, 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
Constants
- compact → const SContextMenuTheme
- Compact preset for dense UIs / data-heavy tools.
- desktop → const SContextMenuTheme
- Desktop-oriented preset (clean floating panel, crisp borders, lower blur).
- modern → const SContextMenuTheme
- Default modern preset used by the package.