FormFieldButtonStyleData class
A class to configure the theme of the button when using DropdownButtonFormField2.
Note: To configure the button's overlay colors when using DropdownButtonFormField2,
use InputDecoration with filled: true. This works similarly to TextField.
i.e:
decoration: InputDecoration(
filled: true,
fillColor: Colors.green,
hoverColor: Colors.red,
focusColor: Colors.blue,
),
// Or
decoration: InputDecoration(
filled: true,
fillColor: WidgetStateColor.fromMap({
WidgetState.hovered: Colors.red,
WidgetState.focused: Colors.blue,
WidgetState.any: Colors.green,
}),
),
Constructors
- FormFieldButtonStyleData({double? height, double? width, EdgeInsetsGeometry? padding, BoxDecoration? decoration, BoxDecoration? foregroundDecoration, int? elevation})
-
Creates a FormFieldButtonStyleData.
It's a class to configure the theme of the button when using DropdownButtonFormField2.
const
Properties
- decoration → BoxDecoration?
-
The decoration of the Button
finalinherited
- elevation → int?
-
The elevation of the Button
finalinherited
- foregroundDecoration → BoxDecoration?
-
The decoration to paint in front of the Button
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
The height of the button
finalinherited
- padding → EdgeInsetsGeometry?
-
The inner padding of the Button
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- width → double?
-
The width of the button
finalinherited
Methods
-
copyWith(
{double? height, double? width, EdgeInsetsGeometry? padding, BoxDecoration? decoration, BoxDecoration? foregroundDecoration, int? elevation}) → FormFieldButtonStyleData - Create a clone of the current FormFieldButtonStyleData but with the provided parameters overridden.
-
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