I was unable to reproduce the issue following the provided steps in the current master branch, seems that the Gallery project is not using the widget mentioned in the issue any more (Dropdown button).
Flutter Doctor:
Flutter 1.19.0-6.0.pre.42 • channel master • https://github.com/flutter/flutter.git
Framework • revision d9653445f4 (12 hours ago) • 2020-06-09 18:43:03 -0400
Engine • revision e8c13aa012
Tools • Dart 2.9.0 (build 2.9.0-14.0.dev 5c1376615e)
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.19.0-6.0.pre.42, on Microsoft Windows [Version 10.0.18362.900], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.0.2)
[√] Android Studio (version 3.6)
[!] Android Studio (version 4.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
X android-studio-dir = C:\Program
X Android Studio not found at C:\Program
[√] IntelliJ IDEA Community Edition (version 2019.3)
[√] VS Code (version 1.45.1)
[√] Connected device (4 available)
! Doctor found issues in 2 categories.
C:\IdeaProjects\gallery>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, 1.19.0-6.0.pre.42, on Microsoft Windows [Version 10.0.18362.900], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.0.2)
[√] Android Studio (version 3.6)
[!] Android Studio (version 4.0)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[!] Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
X android-studio-dir = C:\Program
X Android Studio not found at C:\Program
[√] IntelliJ IDEA Community Edition (version 2019.3)
[√] VS Code (version 1.45.1)
[√] Connected device (4 available)
! Doctor found issues in 2 categories.
I also was unable to reproduce the issue in the current master branch with the following code:
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
String dropdownValue;
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: DropdownButton<String>(
value: dropdownValue,
icon: Icon(Icons.arrow_downward),
iconSize: 24,
elevation: 16,
style: TextStyle(color: Colors.deepPurple),
underline: Container(
height: 2,
color: Colors.deepPurpleAccent,
),
onChanged: (String newValue) {
setState(() {
dropdownValue = newValue;
});
},
items: <String>['One', 'Two', 'Free', 'Four']
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value),
);
}).toList(),
),
),
),
);
}
}
I think we can close this issue for now since the code in the comment #2 was not able to reproduce the problem and its seems that it was already fixed in the current master branch. Feel free to re-open if you face this issue again.