ShadCommandTheme class
Theme for the ShadCommand widget.
- Annotations
-
- @themeGen
- @immutable
Constructors
- ShadCommandTheme({bool canMerge = true, Color? backgroundColor, ShadDecoration? decoration, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? searchPadding, EdgeInsetsGeometry? optionsPadding, TextStyle? groupHeadingStyle, EdgeInsetsGeometry? groupHeadingPadding, EdgeInsetsGeometry? itemPadding, TextStyle? itemTextStyle, Color? itemSelectedBackgroundColor, Color? itemSelectedForegroundColor, Color? itemForegroundColor, BorderRadiusGeometry? itemRadius, double? itemGap, double? height, double? width, EdgeInsetsGeometry? emptyPadding, TextStyle? emptyTextStyle, ShadDecoration? searchDecoration, double? searchHeight, Color? searchIconColor, double? searchIconSize, double? searchGap, EdgeInsetsGeometry? searchInputPadding, double? listMaxHeight, EdgeInsetsGeometry? groupPadding, BorderRadiusGeometry? dialogItemRadius, double? itemIconSize})
-
Theme for the
ShadCommandwidget.const
Properties
- backgroundColor → Color?
-
The background color of the palette.
final
- canMerge → bool
-
no setter
- decoration → ShadDecoration?
-
The decoration of the palette.
final
- dialogItemRadius → BorderRadiusGeometry?
-
The corner radius of an item inside a command dialog, where shadcn
rounds a step past the inline itemRadius
(
in-data-[slot=dialog-content]:rounded-lg!).final - emptyPadding → EdgeInsetsGeometry?
-
The padding around the empty state.
final
- emptyTextStyle → TextStyle?
-
The style of the empty state's text,
.cn-command-empty'stext-sm.final - groupHeadingPadding → EdgeInsetsGeometry?
-
The padding around a
ShadCommandGroupheading.final - groupHeadingStyle → TextStyle?
-
The style of a
ShadCommandGroupheading.final - groupPadding → EdgeInsetsGeometry?
-
The padding around each group of items,
.cn-command-group'sp-1.final - hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The height of the palette.
final
- itemForegroundColor → Color?
-
The content color of a non-highlighted item.
final
- itemGap → double?
-
The gap between an item's leading widget, label and trailing widget.
final
- itemIconSize → double?
-
The size of an item's leading icon,
[&_svg:not([class*='size-'])]:size-4.final - itemPadding → EdgeInsetsGeometry?
-
The padding inside a
ShadCommandItem.final - itemRadius → BorderRadiusGeometry?
-
The corner radius of an item.
final
- itemSelectedBackgroundColor → Color?
-
The background color of the highlighted item.
final
- itemSelectedForegroundColor → Color?
-
The content color of the highlighted item.
final
- itemTextStyle → TextStyle?
-
The text style of a
ShadCommandItem.final - listMaxHeight → double?
-
The tallest the scrollable list may grow,
.cn-command-list'smax-h-72. The palette shrinks below it when the results are shorter.final - optionsPadding → EdgeInsetsGeometry?
-
The padding around the scrollable option list.
final
- padding → EdgeInsetsGeometry?
-
The padding around the palette's contents.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchDecoration → ShadDecoration?
-
The decoration of the box around the search field — shadcn's
.cn-command-input-group: an--inputwash inside a soft outline, with no focus ring.final - searchGap → double?
-
The gap between the search icon and the input's text.
final
- searchHeight → double?
-
The height of the search box,
.cn-command-input-group'sh-8!.final - searchIconColor → Color?
-
The colour of the search icon (
.cn-command-input-icon'sopacity-50over the addon's muted foreground).final - searchIconSize → double?
-
The size of the search icon,
size-4.final - searchInputPadding → EdgeInsetsGeometry?
-
The padding inside the search box, around icon and text.
final
- searchPadding → EdgeInsetsGeometry?
-
The padding around the search field.
final
- width → double?
-
The width of the palette.
final
Methods
-
copyWith(
{Color? backgroundColor, ShadDecoration? decoration, EdgeInsetsGeometry? padding, EdgeInsetsGeometry? searchPadding, EdgeInsetsGeometry? optionsPadding, TextStyle? groupHeadingStyle, EdgeInsetsGeometry? groupHeadingPadding, EdgeInsetsGeometry? itemPadding, TextStyle? itemTextStyle, Color? itemSelectedBackgroundColor, Color? itemSelectedForegroundColor, Color? itemForegroundColor, BorderRadiusGeometry? itemRadius, double? itemGap, double? height, double? width, EdgeInsetsGeometry? emptyPadding, TextStyle? emptyTextStyle, ShadDecoration? searchDecoration, double? searchHeight, Color? searchIconColor, double? searchIconSize, double? searchGap, EdgeInsetsGeometry? searchInputPadding, double? listMaxHeight, EdgeInsetsGeometry? groupPadding, BorderRadiusGeometry? dialogItemRadius, double? itemIconSize}) → ShadCommandTheme -
inherited
-
merge(
ShadCommandTheme? other) → ShadCommandTheme -
inherited
-
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
Static Methods
-
lerp(
ShadCommandTheme? a, ShadCommandTheme? b, double t) → ShadCommandTheme?