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

support SharedPreferencesWithCache and SharedPreferencesAsync. #76

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

hoc081098
Copy link
Owner

@hoc081098 hoc081098 commented Aug 13, 2024

issue #75

This pull request includes several updates to the build configurations, dependency versions, and code refactoring for better performance and compatibility. The most important changes are grouped into themes as follows:

Build Configuration Updates:

  • Updated Java version from 11 to 17 in .github/workflows/build-example.yml to align with newer Java standards. [1] [2]
  • Updated Gradle distribution URL to use version 8.9 in example/android/gradle/wrapper/gradle-wrapper.properties.
  • Changed Android SDK versions in example/android/app/build.gradle to compileSdkVersion 34, minSdkVersion 24, and targetSdkVersion 34 for better compatibility with newer Android versions. [1] [2]

Dependency and Version Updates:

  • Updated dependency versions in example/pubspec.yaml, including Flutter SDK to 3.22.0 and various other dependencies for improved performance and compatibility.
  • Updated Codecov action version in .github/workflows/tests.yml to v4 and added the CODECOV_TOKEN environment variable for better integration.

Code Refactoring and Enhancements:

  • Introduced new plugins and Kotlin configurations in example/android/app/build.gradle to streamline the build process and improve code quality.
  • Renamed key identifiers in example/lib/home.dart and example/lib/dialog.dart for better clarity and consistency. [1] [2]
  • Refactored void main() in example/lib/main.dart to use RxSharedPreferences.async for asynchronous operations.

New Implementations:

  • Added SharedPreferencesAsyncAdapter and SharedPreferencesWithCacheAdapter in lib/src/impl/async/ to support asynchronous operations and caching mechanisms. [1] [2]

File and Structure Changes:

  • Renamed lib/src/impl/shared_preferences_adapter.dart to lib/src/impl/legacy/shared_preferences_adapter.dart and updated imports to reflect the new structure.

@hoc081098 hoc081098 added the enhancement New feature or request label Aug 13, 2024
@hoc081098 hoc081098 self-assigned this Aug 13, 2024
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

Attention: Patch coverage is 85.00000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 92.85%. Comparing base (3c3e491) to head (b1d3cf0).
Report is 5 commits behind head on master.

Files Patch % Lines
...l/async/shared_preferences_with_cache_adapter.dart 83.33% 8 Missing ⚠️
...c/impl/async/shared_preferences_async_adapter.dart 80.00% 7 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3c3e491) and HEAD (b1d3cf0). Click for more details.

HEAD has 54 uploads less than BASE
Flag BASE (3c3e491) HEAD (b1d3cf0)
55 1
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   98.02%   92.85%   -5.17%     
==========================================
  Files           9       11       +2     
  Lines         152      252     +100     
==========================================
+ Hits          149      234      +85     
- Misses          3       18      +15     

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

@josh-burton
Copy link

@hoc081098 any progress on this one?

@hoc081098
Copy link
Owner Author

@hoc081098 any progress on this one?

It is basically done, I will recheck it again and publish a release 🙏

@josh-burton
Copy link

Just wanted to check in on this again - would love to see this merged!

@hoc081098
Copy link
Owner Author

Just wanted to check in on this again - would love to see this merged!

The work is quite busy 😂, so I will check it again this weekend.

@hoc081098 hoc081098 requested a review from Copilot March 17, 2025 04:09

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces support for SharedPreferencesWithCache and SharedPreferencesAsync by updating dependency versions and project configurations.

  • Update environment SDK and Flutter version requirements, along with dependencies in pubspec files.
  • Upgrade Java version and streamline the Flutter version matrix in workflow files.
  • Upgrade tooling versions, including Codecov and flutter_lints, to support the new features.

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.

File Description
example/pubspec.yaml Updates environment and dependency versions to support new features.
.github/workflows/build-example.yml Upgrades Java version and reduces matrix testing to Flutter 3.22.0.
.github/workflows/tests.yml Upgrades Codecov action and updates test matrix for Flutter 3.22.0.
pubspec.yaml Updates environment and dependency versions for broader compatibility.
Comments suppressed due to low confidence (2)

.github/workflows/build-example.yml:67

  • Reducing the test matrix to a single Flutter version may limit coverage; consider retaining additional versions if broader compatibility testing is desired.
version: [ '3.22.0' ]

.github/workflows/tests.yml:53

  • Limiting the test matrix to Flutter 3.22.0 might leave regressions in earlier supported versions undetected; evaluate if testing multiple versions is necessary.
version: [ '3.22.0' ]
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.

2 participants