You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unreadable error message, red font in powershell #49444
Oh, wow, that does look bad. The tool probably can't detect the current terminal background color in a general way, and even if it could, I'd worry that it wouldn't be able to make a smart choice about whether to enable colors. I suspect the best we could do is provide a global command line flag to disable terminal colors.
Hi, this issue is still reproducible on the latest stable and master channels.
Demo
Sample code
import'package:flutter/material.dart';
voidmain() {
runApp(constMyApp());
}
classMyAppextendsStatelessWidget {
constMyApp({Key? key}) :super(key: key);
// This widget is the root of your application.@overrideWidgetbuild(BuildContext context) {
returnMaterialApp(
title:'Flutter Demo',
theme:ThemeData(
// This is the theme of your application.//// Try running your application with "flutter run". You'll see the// application has a blue toolbar. Then, without quitting the app, try// changing the primarySwatch below to Colors.green and then invoke// "hot reload" (press "r" in the console where you ran "flutter run",// or simply save your changes to "hot reload" in a Flutter IDE).// Notice that the counter didn't reset back to zero; the application// is not restarted.
primarySwatch:Colors.blue,
),
home:constMyHomePage(title:'Flutter Demo Home Page'),
);
}
}
classMyHomePageextendsStatefulWidget {
constMyHomePage({Key? key, requiredthis.title}) :super(key: key);
// This widget is the home page of your application. It is stateful, meaning// that it has a State object (defined below) that contains fields that affect// how it looks.// This class is the configuration for the state. It holds the values (in this// case the title) provided by the parent (in this case the App widget) and// used by the build method of the State. Fields in a Widget subclass are// always marked "final".finalString title;
@overrideState<MyHomePage> createState() =>_MyHomePageState();
}
class_MyHomePageStateextendsState<MyHomePage> {
int _counter =0;
void_incrementCounter() {
setState(() {
// This call to setState tells the Flutter framework that something has// changed in this State, which causes it to rerun the build method below// so that the display can reflect the updated values. If we changed// _counter without calling setState(), then the build method would not be// called again, and so nothing would appear to happen.
_counter++;
});
}
@overrideWidgetbuild(BuildContext context) {
var c =1+'a';
// This method is rerun every time setState is called, for instance as done// by the _incrementCounter method above.//// The Flutter framework has been optimized to make rerunning build methods// fast, so that you can just rebuild anything that needs updating rather// than having to individually change instances of widgets.returnScaffold(
appBar:AppBar(
// Here we take the value from the MyHomePage object that was created by// the App.build method, and use it to set our appbar title.
title:Text(widget.title),
),
body:Center(
// Center is a layout widget. It takes a single child and positions it// in the middle of the parent.
child:Column(
// Column is also a layout widget. It takes a list of children and// arranges them vertically. By default, it sizes itself to fit its// children horizontally, and tries to be as tall as its parent.//// Invoke "debug painting" (press "p" in the console, choose the// "Toggle Debug Paint" action from the Flutter Inspector in Android// Studio, or the "Toggle Debug Paint" command in Visual Studio Code)// to see the wireframe for each widget.//// Column has various properties to control how it sizes itself and// how it positions its children. Here we use mainAxisAlignment to// center the children vertically; the main axis here is the vertical// axis because Columns are vertical (the cross axis would be// horizontal).
mainAxisAlignment:MainAxisAlignment.center,
children:<Widget>[
constText(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style:Theme.of(context).textTheme.headline4,
),
TextField(),
],
),
),
floatingActionButton:FloatingActionButton(
onPressed: _incrementCounter,
tooltip:'Increment',
child:constIcon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
flutter doctor -v
[√] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Version 10.0.19043.1766], locale en-US)
• Flutter version 3.0.4 at C:\WIP\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 85684f9300 (5 days ago), 2022-06-30 13:22:47 -0700
• Engine revision 6ba2af10bb
• Dart version 2.17.5
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\AndroidSDK
• Platform android-32, build-tools 32.0.0
• ANDROID_HOME = C:\AndroidSDK
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32616.157
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• 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.12+7-b1504.28-7817840)
[!] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1
• 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
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code (version 1.68.1)
• VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.42.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1766]
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.66
• Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.53
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
[√] Flutter (Channel master, 3.1.0-0.0.pre.1593, on Microsoft Windows [Version 10.0.19043.1766], locale en-US)
• Flutter version 3.1.0-0.0.pre.1593 on channel master at C:\WIP\flutter_master
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 40fc5e86d8 (15 minutes ago), 2022-07-11 05:05:06 -0400
• Engine revision 2b5d5c3b2d
• Dart version 2.18.0 (build 2.18.0-271.0.dev)
• DevTools version 2.15.0
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\AndroidSDK
• Platform android-32, build-tools 32.0.0
• ANDROID_HOME = C:\AndroidSDK
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.5)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32616.157
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2021.2)
• 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.12+7-b1504.28-7817840)
[!] Android Studio (version 2022.1)
• Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1
• 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
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] VS Code (version 1.68.1)
• VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.44.0
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1766]
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
• Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.53
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.
FYI @eliasyishak since this is related to upcoming a11y work. This also reminds me that one option along these lines is for the tool to respect the NO_COLOR env variable à la https://no-color.org/
An easy solution is simply to use highlighted (bright) text for all coloured ouput. I had the same issue with git and that solution worked just fine.
You don't need to come up with a "fancy" solution to try and detect the background colour of the terminal because by default, it's black, and it's always been black for as long as I can remember (at least if you open a terminal with the cmd.exe command).
If you do want to get "fancy", then providing an ability for the user to configure the text colours in a way similar to what is done using git (you just edit the .gitconfig file) would be useful.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
zanderso commentedon Apr 30, 2020
Oh, wow, that does look bad. The tool probably can't detect the current terminal background color in a general way, and even if it could, I'd worry that it wouldn't be able to make a smart choice about whether to enable colors. I suspect the best we could do is provide a global command line flag to disable terminal colors.
mdudek commentedon Jun 18, 2021
Fix it please, it's really annoying when you have to copy/paste every console output to the notepad to resolve the error.
huycozy commentedon Jul 12, 2022
Hi, this issue is still reproducible on the latest
stableandmasterchannels.Demo
Sample code
flutter doctor -v
[√] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Version 10.0.19043.1766], locale en-US) • Flutter version 3.0.4 at C:\WIP\flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 85684f9300 (5 days ago), 2022-06-30 13:22:47 -0700 • Engine revision 6ba2af10bb • Dart version 2.17.5 • DevTools version 2.12.2 [√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at C:\AndroidSDK • Platform android-32, build-tools 32.0.0 • ANDROID_HOME = C:\AndroidSDK • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.5) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.2.32616.157 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2021.2) • 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.12+7-b1504.28-7817840) [!] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1 • 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 X Unable to find bundled Java version. • Try updating or re-installing Android Studio. [√] VS Code (version 1.68.1) • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.42.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1766] • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.66 • Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.53 [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category.[√] Flutter (Channel master, 3.1.0-0.0.pre.1593, on Microsoft Windows [Version 10.0.19043.1766], locale en-US) • Flutter version 3.1.0-0.0.pre.1593 on channel master at C:\WIP\flutter_master • Upstream repository https://github.com/flutter/flutter.git • Framework revision 40fc5e86d8 (15 minutes ago), 2022-07-11 05:05:06 -0400 • Engine revision 2b5d5c3b2d • Dart version 2.18.0 (build 2.18.0-271.0.dev) • DevTools version 2.15.0 [√] Android toolchain - develop for Android devices (Android SDK version 32.0.0) • Android SDK at C:\AndroidSDK • Platform android-32, build-tools 32.0.0 • ANDROID_HOME = C:\AndroidSDK • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.5) • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community • Visual Studio Community 2022 version 17.2.32616.157 • Windows 10 SDK version 10.0.19041.0 [√] Android Studio (version 2021.2) • 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.12+7-b1504.28-7817840) [!] Android Studio (version 2022.1) • Android Studio at C:\Program Files\Android\Android Studio Electric Eel 2022.1.1 • 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 X Unable to find bundled Java version. • Try updating or re-installing Android Studio. [√] VS Code (version 1.68.1) • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.44.0 [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19043.1766] • Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114 • Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.53 [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category.starwarsfan commentedon Jul 22, 2023
Any news here? This is still very annoying...
zanderso commentedon Jul 24, 2023
FYI @eliasyishak since this is related to upcoming a11y work. This also reminds me that one option along these lines is for the tool to respect the
NO_COLORenv variable à la https://no-color.org/hitman-codehq commentedon Aug 21, 2023
An easy solution is simply to use highlighted (bright) text for all coloured ouput. I had the same issue with git and that solution worked just fine.
You don't need to come up with a "fancy" solution to try and detect the background colour of the terminal because by default, it's black, and it's always been black for as long as I can remember (at least if you open a terminal with the cmd.exe command).
If you do want to get "fancy", then providing an ability for the user to configure the text colours in a way similar to what is done using git (you just edit the .gitconfig file) would be useful.
Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (#171892)
Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter#…
github-actions commentedon Jul 24, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter#…
Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter#…
Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (flutter#…
Support `NO_COLOR` to opt-out of `flutter` tool ANSI colors (#171892)