Macacoazul01/month_picker_dialog

No easy way to configure styles

Closed this issue · 11 comments

Hi!

In my application I want to configure style of month texts like fonts, font size and etc. and as I can see only way is to use monthStylePredicate that returns ButtonStyle, it's work fine, but I can't see easy way to configure selected style appearing, because I do not have access to enabled status.

Is there solution for this issue? Maybe I missing TextButton.styleFrom() configuration?

Same there is no easy way to change shape of selected button to oval for example, or change arrows from up/down to left/right, or configure header title style .

This is something i was thinking about changing for a while.

Gonna try to remake the style system, if not until 14/06 probably only after 24/06 so If you want to contribute with this task, feel free to open a PR

Today this is only possible with something like this:

monthStylePredicate: (DateTime val) {
    return TextButton.styleFrom(
      backgroundColor: Colors.yellow[700],
      textStyle: const TextStyle(
        color: Colors.pink,
        fontWeight: FontWeight.bold,
      ),
    );
},

the shape of the border you can change with buttonBorder:

Hi,
I have given a PR for styling texts of month, please check and close it

@sivaprasadnk this wont fix this issue as the package still needs a style rework. And also the PR needs to follow the style of the selected months/years

Can you fix this bug and add the style also to the year?

@Macacoazul01 "PR needs to follow the style of the selected months/years" - can you please explain what I need to do ?

The way it was previously made, if you selected a month, the visual of it wouldn't change as expected. Also for the years.
Maybe ill have time tomorrow to review the PR.

Im finishing v5.0 with the new styles settings. Just need to fix some problems with the buttons

@dko-orion and @sivaprasadnk released 5.0 dev 1 version of the package.

The way monthTextStyle was implemented on the PR was breaking predicate and range, so its still not avaliable (and this is why its not the final 5.0).

Still need to update the readme and fix both monthTextStyle and yearTextStyle (essentialy solving month will fix both).

If any of you want to help, please send the PR and I will review.

Fixed on 5.0.0