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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement theming PapercupStyle()
, Flutter 3.0 support and more
#89
Conversation
This specific implementation allows for backward compatibility as mentioned here: https://docs.flutter.dev/development/tools/sdk/release-notes/release-notes-3.0.0#your-code. Closes papercups-io#87.
Renaming the widget from `PaperCupsWidget` to `PapercupsWidget` in order to follow to official Papercups spelling.
This change helps us add consistency and avoid potential naming conflicts.
This commit adds support for full theming of the widget. Some breaking changes to PapercupsWidget & PapercupsProps were made in order to collocate related params. The new API is available in the updated README. Fixes papercups-io#18.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a comment regarding the README, but other than that looks great!
Also added some more refactoring for non-nullsafe snippets here and there. |
I'll do my best to release 3.0 this weekend, thank you so much for all this @CharlesMangwa |
Awesome, thanks for the super fast merge once again! 馃檶 And thanks in advance for the v3 but don't worry, no hurry! |
Hi @aguilaair!
This PR includes a couple of changes listed as follow:
Flutter 3 support
The change made in 1aa6322 fixes the redundant null-aware operators warning introduced in Flutter 3.0, while keeping backwards compatibility for previous Flutter versions.
Full theming support via new
PapercupsStyle
Even with the work made for #18, I encountered some visual discrepancies after enabling dark mode in my app via:
That's why I exposed most of the styling params via the new
PapercupsStyle
class. The new API has been detailed in the updated README. Please feel free to double-check I didn't make any mistake there 馃槄.This change also required a breaking change to
PaperCupsWidget
&Props
in order to collocate all visual params.Prefix all user-facing classes with
Papercups
In order to add consistency and avoid potential naming conflicts, I add
Papercups
as a prefix to all the user-facing classes (PapercupsCustomerMetadata
,PapercupsProps
,PapercupsStyle
&PapercupsIntl
).In the same spirit, I made another breaking change which was renaming
PaperCupsWidget
toPapercupsWidget
, so that it'd follow the official spelling.Update README with missing params
On top of the new
PapercupsStyle
and moving some of the oldPapercupsWidget
&PapercupsProps
params around, I also added some existing params that were not documented yet.I hope all these changes make sense to you and can fit in with what you had planned for the upcoming v3.
Let me know if you'd like me to make some changes! 馃檶