Skip to content

Conversation

@AffanShaikhsurab
Copy link

@AffanShaikhsurab AffanShaikhsurab commented Jan 12, 2025

This PR addresses issue #160591 by adding support for subheader color customization in DatePickerThemeData. Previously, it was not possible to directly modify the subheader styling without relying on onSurface color in the colorScheme.

Changes

  • Added a new property subheaderColor to DatePickerThemeData.
  • Updated the calendar_date_picker.dart implementation to use DatePickerThemeData.subheaderColor if defined, falling back to the previous behavior if null.

Code Behavior

  • If subheaderColor is set, it overrides the default styling of the subheader.
  • Fallback logic ensures backward compatibility by using Theme.of(context).colorScheme.onSurface.withOpacity(0.60) when subheaderColor is not specified.

Before

Using colorScheme: ColorScheme.light(onSurface: Colors.orange),

image

After

Using subheaderColor : Colors.orange , in DatePickerThemeData
image

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

…r color

customization in DatePickerThemeData. Previously,
it was not possible to directly modify the subheader styling without
 relying on onSurface color in the colorScheme.
@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels Jan 12, 2025
@maheshj01
Copy link
Member

maheshj01 commented Jan 13, 2025

@AffanShaikhsurab Please complete the prelaunch checklist by checking the ones that apply

  • to [X]

I am not the right person to review. To escalate the review process I would suggest reaching out to flutter team members on discord.

@AffanShaikhsurab
Copy link
Author

@AffanShaikhsurab Please complete the prelaunch checklist by checking that apply

  • to [X]

I am not the right person to review. To escalate the review process I would suggest reaching out to flutter team members on discord.

yeah sure , are there any specifc members i should approch too !!?

@maheshj01
Copy link
Member

maheshj01 commented Jan 13, 2025

Just ask if someone can give feedback on this PR and you should have the right person taking a look. Reviewers are busy with other issues, so someone should take a look at this one as soon as they can.

you may find reviewers by looking at issues/PRs with similar tags material design, framework

@AffanShaikhsurab
Copy link
Author

ou may find reviewers by looking at issues/PRs with similar tags material design, framework

Sure thanks a lot

@nate-thegrate
Copy link
Contributor

One of the pre-launch checklist items:

  • I read the Tree Hygiene wiki page, which explains my responsibilities.

For future reference, that page recommends waiting 2 weeks before reaching out on Discord, to allow time for the contribution to go through the normal PR triage process.

@AffanShaikhsurab
Copy link
Author

One of the pre-launch checklist items:

  • I read the Tree Hygiene wiki page, which explains my responsibilities.

For future reference, that page recommends waiting 2 weeks before reaching out on Discord, to allow time for the contribution to go through the normal PR triage process

I will make sure of it from now on

removed blank line . as mentioned in the error The error messages reported above are repeated here:
  -- This line intentionally left blank --  
/b/s/w/ir/x/w/flutter/packages/flutter/lib/src/material/date_picker_theme.dart:1164: trailing U+0020 space character in Linux analyze
Copy link
Contributor

@QuncCccccc QuncCccccc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for your contribution! There's a similar PR #161458 and that one seems provide more flexibility that we can customize the text button and the toggle button colors separately. Would you mind if I review that one first?

@AffanShaikhsurab
Copy link
Author

Thanks so much for your contribution! There's a similar PR #161458 and that one seems provide more flexibility that we can customize the text button and the toggle button colors separately. Would you mind if I review that one first?

Yeah, sure! If that offers a better approach, then it's definitely better.

@QuncCccccc
Copy link
Contributor

Thanks so much for your understanding:)

@Piinks
Copy link
Contributor

Piinks commented Jan 29, 2025

Per the conversation here, I am going to close this PR. Thank you for contributing @AffanShaikhsurab! It is much appreciated. :)

@Piinks Piinks closed this Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants