New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[android] - Multitasking logo background color follows the theme #112012
Comments
I can reproduce this, but I'm not sure whether or not this is the intended behaviour. Labeling for further insight from the team. Note: using the code sample below, after switching the theme primary color, you might have to wait a little while or switch to a different app and come back to the app before you see the color change. code sampleimport 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({Key? key}) : super(key: key);
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
MaterialColor themeColor = Colors.blue;
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Quick Actions Demo',
theme: ThemeData(
primarySwatch: themeColor,
),
home: Scaffold(
appBar: AppBar(
title: const Text("Changing Theme Color"),
),
body: Center(
child: Text('current color: $themeColor'),
),
floatingActionButton: FloatingActionButton(
onPressed: () {
setState(() {
if (themeColor == Colors.blue) {
themeColor = Colors.green;
} else {
themeColor = Colors.blue;
}
});
},
),
),
);
}
}
flutter doctor -v
|
@danagbemava-nc i partially agree with you that maybe this should be the intended behavior, but only when there isn't a custom config for the logo. |
@danagbemava-nc on ios this isn't a problem, everything works fine |
Closing this as working as intended. If you have a feature request on how the existing API can be updated to account for the behavior you are looking for, please file a new issue. |
This happens with the
This is documented here: https://api.flutter.dev/flutter/material/MaterialApp/color.html Please feel free to ping this issue back if you looked somewhere else and expected to find this documentation but didn't. |
@chinmaygarde this doesn't make any sense. Why android should work like this and not ios? So you're saying that my app on dark mode should have a different multitasking logo than the same app on light mode?🙃 |
Android and iOS work differently. There's no way on iOS to specify this color. |
We should update the docs on |
@dnfield this will be really nice! |
It worked! |
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 |
The multitasking logo background color on android follows the theme of the app instead of having the pre-determined color.
First I had thought that this problem was because of something wrong with flutter_launcher_icons
So there is this issue being tracked: #287
But running the counter app on the android simulator already shows the problem:
theme: ThemeData(
primarySwatch: Colors.red,
),
this issue isn't new (flutter 3.0 or 3.3 related).
my flutter doctor:
The text was updated successfully, but these errors were encountered: