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鈥檒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

Merged
merged 9 commits into from May 27, 2022

Conversation

CharlesMangwa
Copy link
Contributor

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:

MaterialApp(
  theme: Themes.lightMode, // Light mode ThemeData
  darkTheme: Themes.darkMode, // Dark mode ThemeData
)

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 馃槄.

鈿狅笍 BREAKING CHANGE

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).

鈿狅笍 BREAKING CHANGE

In the same spirit, I made another breaking change which was renaming PaperCupsWidget to PapercupsWidget, so that it'd follow the official spelling.

Update README with missing params

On top of the new PapercupsStyle and moving some of the old PapercupsWidget & 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! 馃檶

CharlesMangwa and others added 7 commits May 11, 2022 08:30
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.
Copy link
Collaborator

@aguilaair aguilaair left a 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!

README.md Outdated Show resolved Hide resolved
lib/papercups_flutter.dart Show resolved Hide resolved
lib/papercups_flutter.dart Show resolved Hide resolved
lib/papercups_flutter.dart Show resolved Hide resolved
@aguilaair aguilaair added the enhancement New feature or request label May 27, 2022
@CharlesMangwa CharlesMangwa marked this pull request as draft May 27, 2022 15:08
@CharlesMangwa
Copy link
Contributor Author

Also added some more refactoring for non-nullsafe snippets here and there.

@CharlesMangwa CharlesMangwa marked this pull request as ready for review May 27, 2022 15:42
@aguilaair aguilaair merged commit 62ea1a3 into papercups-io:main May 27, 2022
@aguilaair
Copy link
Collaborator

I'll do my best to release 3.0 this weekend, thank you so much for all this @CharlesMangwa

@CharlesMangwa
Copy link
Contributor Author

CharlesMangwa commented May 27, 2022

Awesome, thanks for the super fast merge once again! 馃檶 And thanks in advance for the v3 but don't worry, no hurry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants