@@ -116,9 +116,9 @@ class DropdownButton2<T> extends StatefulWidget {
116
116
this .customButton,
117
117
this .openWithLongPress = false ,
118
118
this .barrierDismissible = true ,
119
+ this .barrierCoversButton = true ,
119
120
this .barrierColor,
120
121
this .barrierLabel,
121
- this .barrierCoversButton = true ,
122
122
this .openDropdownListenable,
123
123
// When adding new arguments, consider adding similar arguments to
124
124
// DropdownButtonFormField.
@@ -155,8 +155,8 @@ class DropdownButton2<T> extends StatefulWidget {
155
155
required this .customButton,
156
156
required this .openWithLongPress,
157
157
required this .barrierDismissible,
158
+ required this .barrierCoversButton,
158
159
required this .barrierColor,
159
- this .barrierCoversButton = true ,
160
160
required this .barrierLabel,
161
161
required this .openDropdownListenable,
162
162
required InputDecoration inputDecoration,
@@ -338,6 +338,11 @@ class DropdownButton2<T> extends StatefulWidget {
338
338
/// Whether you can dismiss this route by tapping the modal barrier.
339
339
final bool barrierDismissible;
340
340
341
+ /// Specifies whether the modal barrier should cover the dropdown button or not.
342
+ ///
343
+ /// Defaults to true.
344
+ final bool barrierCoversButton;
345
+
341
346
/// The color to use for the modal barrier. If this is null, the barrier will
342
347
/// be transparent.
343
348
final Color ? barrierColor;
@@ -348,11 +353,6 @@ class DropdownButton2<T> extends StatefulWidget {
348
353
/// accessibility tools (like VoiceOver on iOS) focus on the barrier.
349
354
final String ? barrierLabel;
350
355
351
- /// Specifies whether the modal barrier should cover the dropdown button or not.
352
- ///
353
- /// Defaults to true.
354
- final bool barrierCoversButton;
355
-
356
356
/// A [Listenable] that can be used to programmatically open the dropdown menu.
357
357
///
358
358
/// The [openDropdownListenable] allows you to manually open the dropdown by modifying its value.
@@ -985,6 +985,7 @@ class DropdownButtonFormField2<T> extends FormField<T> {
985
985
Widget ? customButton,
986
986
bool openWithLongPress = false ,
987
987
bool barrierDismissible = true ,
988
+ bool barrierCoversButton = true ,
988
989
Color ? barrierColor,
989
990
String ? barrierLabel,
990
991
Listenable ? openDropdownListenable,
@@ -1056,6 +1057,7 @@ class DropdownButtonFormField2<T> extends FormField<T> {
1056
1057
customButton: customButton,
1057
1058
openWithLongPress: openWithLongPress,
1058
1059
barrierDismissible: barrierDismissible,
1060
+ barrierCoversButton: barrierCoversButton,
1059
1061
barrierColor: barrierColor,
1060
1062
barrierLabel: barrierLabel,
1061
1063
openDropdownListenable: openDropdownListenable,
0 commit comments