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

update v0.5.0 #22

Merged
merged 2 commits into from
May 15, 2024
Merged

update v0.5.0 #22

merged 2 commits into from
May 15, 2024

Conversation

basemosama
Copy link
Member

0.5.0

Note: This release contains breaking changes.

New Features

PlayxThemeBuilder

PlayxThemeBuilder now uses an InheritedWidget to provide themes to its child widgets, enhancing theme management and widget rebuilding.

  • Theme Access:
    • Use XTheme.of(context) or context.xTheme to get the current theme.
    • Use PlayxColors.of(context) or context.playxColors to get the current theme colors.

Use these methods to access theme or color information in your widgets. This ensures widgets are rebuilt correctly when the theme changes.

  • Legacy Access:
    • You can still use PlayxTheme.currentTheme to access the current theme when you don't have a BuildContext. However, note that using PlayxTheme.currentTheme will not trigger a widget rebuild on theme changes.

Breaking Changes

  • Class Renaming for Consistency:
    • XColors is now PlayxColors to maintain consistency with the package name.
    • XThemeConfig is now PlayxThemeConfig for the same reason.

Copy link

codecov bot commented May 15, 2024

Codecov Report

Attention: Patch coverage is 9.37500% with 29 lines in your changes are missing coverage. Please review.

Project coverage is 37.20%. Comparing base (b6c792e) to head (fb36f2d).
Report is 14 commits behind head on main.

Files Patch % Lines
lib/src/model/playx_colors.dart 11.11% 8 Missing ⚠️
lib/src/widgets/playx_inherited_theme.dart 0.00% 8 Missing ⚠️
lib/src/utils/build_context_extension.dart 0.00% 6 Missing ⚠️
lib/src/model/x_theme.dart 0.00% 4 Missing ⚠️
lib/src/widgets/playx_theme_builder.dart 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #22      +/-   ##
==========================================
- Coverage   40.28%   37.20%   -3.08%     
==========================================
  Files          11       13       +2     
  Lines         278      301      +23     
==========================================
  Hits          112      112              
- Misses        166      189      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@basemosama basemosama merged commit 5690340 into main May 15, 2024
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant