-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
a: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages team
Description
Run this:
import 'package:flutter/material.dart';
void main() {
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData.dark(),
home: Scaffold(
body: DropdownButtonHideUnderline(
child: DropdownButtonFormField<Color>(
selectedItemBuilder: (context) {
return [
DropdownMenuItem<Color>(
value: Colors.green,
child: RichText(
text: TextSpan(
children: [
WidgetSpan(
child: Padding(
padding: const EdgeInsets.only(
right: 10,
),
child: Icon(Icons.ac_unit),
),
baseline: TextBaseline.alphabetic,
alignment: PlaceholderAlignment.aboveBaseline,
),
const TextSpan(text: 'By '),
TextSpan(
text: 'test',
style: const TextStyle(
fontWeight: FontWeight.w700,
),
),
],
),
),
)
];
},
icon: SizedBox(),
value: Colors.accents[1],
decoration: const InputDecoration(
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.transparent,
),
),
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
color: Colors.transparent,
),
),
labelStyle: TextStyle(
color: Colors.black,
fontWeight: FontWeight.w500,
fontSize: 14,
),
),
items: Colors.accents.map((value) {
return DropdownMenuItem<Color>(
value: value,
child: RichText(
text: TextSpan(
children: [
TextSpan(
text: value.toString(),
style: const TextStyle(
fontWeight: FontWeight.w700,
),
),
],
),
),
);
}).toList(),
onChanged: (value) {},
),
),
),
),
);
}Doctor:
[✓] Flutter (Channel stable, 2.5.3, on Microsoft Windows [Version 10.0.22000.282], locale en-US)
• Flutter version 2.5.3 at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 18116933e7 (2 weeks ago), 2021-10-15 10:46:35 -0700
• Engine revision d3ea636dc5
• Dart version 2.14.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Agone\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.11.31729.503
• Windows 10 SDK version 10.0.19041.0
[✓] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2021.2.2
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
[✓] VS Code (version 1.61.2)
• VS Code at C:\Users\Agone\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.27.0
[✓] VS Code (version 1.62.0-insider)
• VS Code at C:\Users\Agone\AppData\Local\Programs\Microsoft VS Code Insiders
• Flutter extension version 3.27.0
[✓] Connected device (1 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.22000.282]
• No issues found!
Selected item disappears as a result.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: error messageError messages from the Flutter frameworkError messages from the Flutter frameworkf: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.team-designOwned by Design Languages teamOwned by Design Languages team