DropdownStyle class
To allow for both gradient and solid color, in many places, the LinearGradient class is used instead of the Color class.
If a solid, single color is what you want, simply provide LinearGradient(colors: yourSingleColor, yourSingleColor
) --
in other words, a LinearGradient instance with the same color provided at least twice in the colors array.
Constructors
-
DropdownStyle({bool invertYAxisAlignmentWhenOverflow = true, Curve transitionInCurve = Curves.linear, Duration transitionInDuration = const Duration(milliseconds: 100), List<
BoxShadow> boxShadows = const [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.1), blurRadius: 10, offset: Offset(0, 1)), BoxShadow(color: Color.fromRGBO(35, 64, 98, 0.1), blurRadius: 25)], DropdownScrollbarStyle dropdownScrollbarStyle = const DropdownScrollbarStyle(), LinearGradient onTapItemColor = const LinearGradient(colors: [Color(0xffffffff), Color(0xefffffff)]), LinearGradient defaultItemColor = const LinearGradient(colors: [Color(0xefffffff), Color(0xefffffff)]), TextStyle defaultTextStyle = const TextStyle(color: Colors.black), TextStyle? descriptionStyle = const TextStyle(color: Colors.grey, fontSize: 12), TextStyle onTapTextStyle = const TextStyle(color: Color(0xbb000000)), MaterialColor onTapInkColor = _blueMat, double explicitMarginBetweenDropdownAndTarget = 0, Alignment alignment = Alignment.bottomCenter, Color borderColor = const Color(0x00000000), double borderThickness = 0, DropdownMaxHeight dropdownMaxHeight = const DropdownMaxHeight(), BorderRadius borderRadius = const BorderRadius.all(Radius.circular(9)), Duration onTapColorTransitionDuration = const Duration(milliseconds: 50), DropdownWidth dropdownWidth = const DropdownWidth(), double spaceBetweenValueAndDescription = 12}) -
const
Properties
- alignment → Alignment
-
final
- borderColor → Color
-
final
- borderRadius → BorderRadius
-
final
- borderThickness → double
-
final
-
boxShadows
→ List<
BoxShadow> -
final
- defaultItemColor → LinearGradient
-
The dropdown itself does not have a padding, so setting this would be equivalent to setting the dropdown's background color.
final
- defaultTextStyle → TextStyle
-
The style for the values.
final
- descriptionStyle → TextStyle?
-
The style for the descriptions.
final
- dropdownMaxHeight → DropdownMaxHeight
-
final
- dropdownScrollbarStyle → DropdownScrollbarStyle
-
final
- dropdownWidth → DropdownWidth
-
final
- explicitMarginBetweenDropdownAndTarget → double
-
Why
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- invertYAxisAlignmentWhenOverflow → bool
-
Whether or not to swap the alignment, for example, from bottomCenter to topCenter when
the bottom of the dropdown exceeds the screen height.
final
- onTapColorTransitionDuration → Duration
-
final
- onTapInkColor → MaterialColor
-
Material's inkwell color.
final
- onTapItemColor → LinearGradient
-
The color of a dropdown when tapped
final
- onTapTextStyle → TextStyle
-
Style for dropdown text when tapped
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spaceBetweenValueAndDescription → double
-
final
- transitionInCurve → Curve
-
Animation curve for transitionInDuration
final
- transitionInDuration → Duration
-
Animation duration before the dropdown becomes fully expanded.
final
Methods
-
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