Skip to content
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

dialog background color is not configurable #7320

Closed
lequem opened this issue Jan 2, 2017 · 8 comments
Closed

dialog background color is not configurable #7320

lequem opened this issue Jan 2, 2017 · 8 comments
Assignees
Labels
c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels.

Comments

@lequem
Copy link
Contributor

lequem commented Jan 2, 2017

In the dialog.dart file, line 44 and 46, the background color is set staticly and not configurable for Dialogs, whereas in ThemeData class, we can configure everything for the application.

I propose to define the new property dialogBackgroundColor in the ThemeData class and use it in the dialog.dart file.

@abarth abarth added framework flutter/packages/flutter repository. See also f: labels. c: new feature Nothing broken; request for a new capability labels Jan 2, 2017
@abarth abarth added this to the 3: Make conferences happy milestone Jan 2, 2017
@abarth abarth added the easy fix label Jan 2, 2017
lequem added a commit to lequem/flutter that referenced this issue Jan 3, 2017
@lequem
Copy link
Contributor Author

lequem commented Jan 3, 2017

I have pulled a request to patch this but the travis task failed and I don't understand why.

@sethladd
Copy link
Contributor

sethladd commented Jan 3, 2017

PR is here: #7321

@sethladd
Copy link
Contributor

sethladd commented Jan 3, 2017

cc @cbracken @yjbanov does the travis failure look familiar?

@cbracken
Copy link
Member

cbracken commented Jan 3, 2017

Travis run looks green after @abarth's re-run. Is there a way to get at the previous (failed) run to take a look?

@abarth
Copy link
Contributor

abarth commented Jan 4, 2017

@cbracken Sorry, next time I'll save the log.

@FlutterIODev
Copy link

Can I set the color for a specific dialog not for all of my app dialogs?

@yjbanov
Copy link
Contributor

yjbanov commented Oct 26, 2018

@FlutterIODev something along these lines should do it (but I haven't tried myself):

Theme(
  data: themeDataWithCustomDialogColor,
  child: Builder(builder: (BuildContext contextWithNewTheme) {
    // some widget here will be calling `showDialog`. When it
    // does that, it should pass `contextWithNewTheme` to it,
    // e.g. `showDialog(context: contextWithNewTheme, ...);`
  }),
);

Having to wrap like that is a bit annoying, but I think it's consequence of #12655. Maybe @Hixie knows of a better way.

@github-actions
Copy link

github-actions bot commented Sep 1, 2021

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

No branches or pull requests

6 participants