USideMenuTheme class
Colors, sizes and animation of USideMenu; USideMenuTheme.from(context) follows the app theme.
Constructors
-
USideMenuTheme({required Color backgroundColor, required Color selectedItemColor, required Color hoverColor, required Color indicatorColor, required Color selectedTextColor, required Color unselectedTextColor, required Color selectedIconColor, required Color unselectedIconColor, required Color scrimColor, required Color dividerColor, double expandedWidth = 280, double railWidth = 84, Gradient? backgroundGradient, TextStyle? itemTextStyle, TextStyle? headerTextStyle, double iconSize = 22, double itemSpacing = 4, EdgeInsetsGeometry itemPadding = const EdgeInsets.symmetric(horizontal: 12), BorderRadius itemRadius = const BorderRadius.all(Radius.circular(14)), USideMenuIndicatorStyle indicatorStyle = USideMenuIndicatorStyle.bar, Duration animationDuration = const Duration(milliseconds: 600), Curve animationCurve = Curves.easeOutCubic, bool enableHoverElevation = true, List<
BoxShadow> ? shadow}) -
const
- USideMenuTheme.from(BuildContext context)
-
Theme built from the app's colors.
factory
Properties
- animationCurve → Curve
-
Expand/collapse curve.
final
- animationDuration → Duration
-
Length of the animation.
final
- backgroundColor → Color
-
Background color.
final
- backgroundGradient → Gradient?
-
Background gradient.
final
- dividerColor → Color
-
Divider color.
final
- enableHoverElevation → bool
-
Lifts rows on mouse hover.
final
- expandedWidth → double
-
Width when expanded.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerTextStyle → TextStyle?
-
Section header style.
final
- hoverColor → Color
-
Color while a mouse hovers (desktop, web).
final
- iconSize → double
-
Icon size.
final
- indicatorColor → Color
-
Indicator color.
final
- indicatorStyle → USideMenuIndicatorStyle
-
Selected highlight style.
final
- itemPadding → EdgeInsetsGeometry
-
Padding of each item.
final
- itemRadius → BorderRadius
-
Row corner radius.
final
- itemSpacing → double
-
Gap between rows.
final
- itemTextStyle → TextStyle?
-
Row text style.
final
- railWidth → double
-
Width as a rail.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scrimColor → Color
-
Dim color behind the drawer.
final
- selectedIconColor → Color
-
Selected row icon color.
final
- selectedItemColor → Color
-
Selected row background.
final
- selectedTextColor → Color
-
Selected row text color.
final
-
shadow
→ List<
BoxShadow> ? -
Menu shadow.
final
- unselectedIconColor → Color
-
Row icon color.
final
- unselectedTextColor → Color
-
Row text color.
final
Methods
-
copyWith(
{double? expandedWidth, double? railWidth, Color? backgroundColor, Gradient? backgroundGradient, Color? selectedItemColor, Color? hoverColor, Color? indicatorColor, Color? selectedTextColor, Color? unselectedTextColor, Color? selectedIconColor, Color? unselectedIconColor, TextStyle? itemTextStyle, TextStyle? headerTextStyle, double? iconSize, double? itemSpacing, EdgeInsetsGeometry? itemPadding, BorderRadius? itemRadius, USideMenuIndicatorStyle? indicatorStyle, Duration? animationDuration, Curve? animationCurve, bool? enableHoverElevation, List< BoxShadow> ? shadow, Color? scrimColor, Color? dividerColor}) → USideMenuTheme - Copy with some fields changed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited