Closed fdennis closed 2 years ago
Great catch, easy fix. @loic-sharma
I just started to dig into this and managed to set the title bar color to black from the flutter side.
While working on this a few questions regarding the expected behaviour came to my mind:
Who is responsible for the title bars color? The OS or the Application? If both, whats the priority?
Via DwmSetWindowAttribute
only plain black is possible. More colors are possible but windows settings do not support that, so that somehow has to be defined in flutter
https://github.com/flutter/flutter/pull/110890 was reverted.
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.
Steps to Reproduce
theme: ThemeData.dark(),
Shouldn't the title bar also be dark, since the Windows theme is in dark mode? Microsoft has written about this here https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/apply-windows-themes#enable-a-dark-mode-title-bar-for-win32-applications but I am wondering if this is something Flutter can do?
Expected results: Title bar is expected to be dark.
Actual results: Title bar is light.
Code sample
```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); // This widget is the root of your application. @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData.dark(), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { const MyHomePage({Key? key, required this.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". final String title; @override StateLogs
``` ``` ``` ``` ``` ```