@@ -110,7 +110,6 @@ class _DropdownMenuPainter extends CustomPainter {
110110// The widget that is the button wrapping the menu items.
111111class _DropdownMenuItemButton <T > extends StatefulWidget {
112112 const _DropdownMenuItemButton ({
113- super .key,
114113 this .padding,
115114 required this .route,
116115 required this .buttonRect,
@@ -249,7 +248,6 @@ class _DropdownMenuItemButtonState<T> extends State<_DropdownMenuItemButton<T>>
249248
250249class _DropdownMenu <T > extends StatefulWidget {
251250 const _DropdownMenu ({
252- super .key,
253251 this .padding,
254252 required this .route,
255253 required this .buttonRect,
@@ -258,7 +256,6 @@ class _DropdownMenu<T> extends StatefulWidget {
258256 required this .enableFeedback,
259257 this .borderRadius,
260258 required this .scrollController,
261- this .menuWidth,
262259 this .mouseCursor,
263260 });
264261
@@ -270,7 +267,6 @@ class _DropdownMenu<T> extends StatefulWidget {
270267 final bool enableFeedback;
271268 final BorderRadius ? borderRadius;
272269 final ScrollController scrollController;
273- final double ? menuWidth;
274270 final MouseCursor ? mouseCursor;
275271
276272 @override
@@ -649,7 +645,6 @@ class _DropdownRoute<T> extends PopupRoute<_DropdownRouteResult<T>> {
649645
650646class _DropdownRoutePage <T > extends StatefulWidget {
651647 const _DropdownRoutePage ({
652- super .key,
653648 required this .route,
654649 required this .constraints,
655650 this .items,
@@ -758,7 +753,7 @@ class _DropdownRoutePageState<T> extends State<_DropdownRoutePage<T>> {
758753// selected item lines up with the vertical center of the dropdown button,
759754// as closely as possible.
760755class _MenuItem <T > extends SingleChildRenderObjectWidget {
761- const _MenuItem ({super .key, required this .onLayout, required this .item}) : super (child: item);
756+ const _MenuItem ({required this .onLayout, required this .item}) : super (child: item);
762757
763758 final ValueChanged <Size > onLayout;
764759 final DropdownMenuItem <T >? item;
@@ -1054,7 +1049,6 @@ class DropdownButton<T> extends StatefulWidget {
10541049 _isEmpty = false ;
10551050
10561051 DropdownButton ._formField ({
1057- super .key,
10581052 required this .items,
10591053 this .selectedItemBuilder,
10601054 this .value,
@@ -1064,15 +1058,13 @@ class DropdownButton<T> extends StatefulWidget {
10641058 this .onTap,
10651059 this .elevation = 8 ,
10661060 this .style,
1067- this .underline,
10681061 this .icon,
10691062 this .iconDisabledColor,
10701063 this .iconEnabledColor,
10711064 this .iconSize = 24.0 ,
10721065 this .isDense = false ,
10731066 this .isExpanded = false ,
10741067 this .itemHeight = kMinInteractiveDimension,
1075- this .menuWidth,
10761068 this .focusColor,
10771069 this .focusNode,
10781070 this .autofocus = false ,
@@ -1087,7 +1079,9 @@ class DropdownButton<T> extends StatefulWidget {
10871079 this .dropdownMenuItemMouseCursor,
10881080 required this ._inputDecoration,
10891081 required this ._isEmpty,
1090- }) : assert (
1082+ }) : underline = null ,
1083+ menuWidth = null ,
1084+ assert (
10911085 items == null ||
10921086 items.isEmpty ||
10931087 value == null ||
0 commit comments