文件最后提交记录最后更新时间
[dependabot]: Bump io.mockk:mockk from 1.14.0 to 1.14.2 in /packages/shared_preferences/shared_preferences_android/android in the test-dependencies group across 1 directory (#9201) Bumps the test-dependencies group with 1 update in the /packages/shared_preferences/shared_preferences_android/android directory: [io.mockk:mockk](https://github.com/mockk/mockk). Updates io.mockk:mockk from 1.14.0 to 1.14.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/mockk/mockk/releases">io.mockk:mockk's releases</a>.</em></p> <blockquote> <h2>1.14.2</h2> <h2>What's Changed</h2> <ul> <li>Change mockk configuration paths to test sourceSet by <a href="https://github.com/TWiStErRob"><code>@​TWiStErRob</code></a> in <a href="https://redirect.github.com/mockk/mockk/pull/1378">mockk/mockk#1378</a></li> <li>Use redefine if mockkStatic is used (fix candidate for <a href="https://redirect.github.com/mockk/mockk/issues/1375">#1375</a>) by <a href="https://github.com/sgerke-1L"><code>@​sgerke-1L</code></a> in <a href="https://redirect.github.com/mockk/mockk/pull/1376">mockk/mockk#1376</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/mockk/mockk/compare/1.14.0...1.14.2">https://github.com/mockk/mockk/compare/1.14.0...1.14.2</a></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/mockk/mockk/commit/be5b234297332a30615cdfbb929591ef1e6cfe2d"><code>be5b234</code></a> Version bump</li> <li><a href="https://github.com/mockk/mockk/commit/ea2d003e8e22fcf23a1eda8aa4080390dba66583"><code>ea2d003</code></a> Merge pull request <a href="https://redirect.github.com/mockk/mockk/issues/1376">#1376</a> from sgerke-1L/fix-1375</li> <li><a href="https://github.com/mockk/mockk/commit/f5001415cbc17cd0d5b23dc43565e22da1eb20e0"><code>f500141</code></a> Remove unused var</li> <li><a href="https://github.com/mockk/mockk/commit/3e2ad31513958791461b2357da0b1b3b9d421063"><code>3e2ad31</code></a> Simplify test case</li> <li><a href="https://github.com/mockk/mockk/commit/0a0ed8d78180501f347215b7936ae1c3f18a8339"><code>0a0ed8d</code></a> Change approach to VisibilityBridgeStrategy</li> <li><a href="https://github.com/mockk/mockk/commit/23038a0f2519aa466eb2f8c187dc6593d52e4aa8"><code>23038a0</code></a> Merge pull request <a href="https://redirect.github.com/mockk/mockk/issues/1378">#1378</a> from TWiStErRob/patch-2</li> <li><a href="https://github.com/mockk/mockk/commit/529538388f9caea7b7b04031d6a1ef7ee2d1174f"><code>5295383</code></a> Update README.md</li> <li><a href="https://github.com/mockk/mockk/commit/d3fff914943e9795d11b37c4033d43078448c89b"><code>d3fff91</code></a> Move test to its own file</li> <li><a href="https://github.com/mockk/mockk/commit/7c48f19f0324b209a4bf325aa11e27a06b0bbe59"><code>7c48f19</code></a> Use redefine when mockkStatic is used</li> <li>See full diff in <a href="https://github.com/mockk/mockk/compare/1.14.0...1.14.2">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=io.mockk:mockk&package-manager=gradle&previous-version=1.14.0&new-version=1.14.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - @dependabot rebase will rebase this PR - @dependabot recreate will recreate this PR, overwriting any edits that have been made to it - @dependabot merge will merge this PR after your CI passes on it - @dependabot squash and merge will squash and merge this PR after your CI passes on it - @dependabot cancel merge will cancel a previously requested merge and block automerging - @dependabot reopen will reopen this PR if it is closed - @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency - @dependabot ignore <dependency name> major version will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - @dependabot ignore <dependency name> minor version will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - @dependabot ignore <dependency name> will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - @dependabot unignore <dependency name> will remove all of the ignore conditions of the specified dependency - @dependabot unignore <dependency name> <ignore condition> will remove the ignore condition of the specified dependency and ignore conditions </details>1 年前
Update repo for 3.32 stable (#9311) Does all of the steps from https://github.com/flutter/flutter/blob/master/docs/ecosystem/release/Updating-Packages-repo-for-a-stable-release.md for the 3.32 stable release (except the first one, as the stable roller has already landed).11 个月前
[various] Update Pigeon for task queue changes (#8654) Picks up the changes to task queue code generation in Pigeon 24.2.0, so that calls to different background methods will be serialized within the whole group, rather than by individual method, as that was how they were intended to work in the first place (and was how the plugins worked when delegation to a background thread was done manually with the plugin, before adopting task queues)1 年前
[shared_preferences] Fix Android type mismatch regression (#8512) getStringList should throw a TypeError if the stored value is of a different type, but the recent change to use JSON-encoded string lists regression that behavior if the stored type was a string, causing it to instead return null. This restores the previous behavior by passing extra information from Kotlin to Dart when attempting to get an enecoded string list, so that if a non-encoded-list string is found, a TypeError can be created on the Dart side. Since extra information is now being passed, the case of a legacy-encoded value is now communicated as well, so that we only have to request the legacy value if it's there, rather than always trying (which was not worth the complexity of adding extra data just for that initially, but now that we need extra data anyway, it's easy to distinguish that case). Fixes OOB regression in shared_preferences tests that has closed the tree.1 年前
[shared_preferences] Fix Android type mismatch regression (#8512) getStringList should throw a TypeError if the stored value is of a different type, but the recent change to use JSON-encoded string lists regression that behavior if the stored type was a string, causing it to instead return null. This restores the previous behavior by passing extra information from Kotlin to Dart when attempting to get an enecoded string list, so that if a non-encoded-list string is found, a TypeError can be created on the Dart side. Since extra information is now being passed, the case of a legacy-encoded value is now communicated as well, so that we only have to request the legacy value if it's there, rather than always trying (which was not worth the complexity of adding extra data just for that initially, but now that we need extra data anyway, it's easy to distinguish that case). Fixes OOB regression in shared_preferences tests that has closed the tree.1 年前
[shared_preferences] Federate mobile implementations (#4505) Fully federates the plugin by moving the existing mobile implementations to their own packages, per planned repo structure. Temporarily marks shared_preferences as unpublishable to allow the implementations to be moved, rather than copied and deleted, in order to better preserve git history. A follow-up PR will restore it to publishable form. Part of flutter/flutter#684984 年前
[various] Scrubs pre-SDK-21 Android code (#9112) - Removes any annotations or runtime checks related to Android API 20 or 21, as 21 is the minimum API version supported by the versions of Flutter these plugins support. - Removes comment/README references to limitations for <21. - Updates READMEs for app-facing packages to reflect the current support levels. Fixes https://github.com/flutter/flutter/issues/157106 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
[shared_preferences] Federate mobile implementations (#4505) Fully federates the plugin by moving the existing mobile implementations to their own packages, per planned repo structure. Temporarily marks shared_preferences as unpublishable to allow the implementations to be moved, rather than copied and deleted, in order to better preserve git history. A follow-up PR will restore it to publishable form. Part of flutter/flutter#684984 年前
[shared_preferences] Adds Shared preferences as option in shared preferences async android (#7994) Adds the ability to select which Android preferences backend (SharedPreferences or DataStore Preferences) one would like to use. Also adds the ability to pick a file name for the shared preferences backend. fixes https://github.com/flutter/flutter/issues/153300 fixes https://github.com/flutter/flutter/issues/143371 年前
[various] Scrubs pre-SDK-21 Android code (#9112) - Removes any annotations or runtime checks related to Android API 20 or 21, as 21 is the minimum API version supported by the versions of Flutter these plugins support. - Removes comment/README references to limitations for <21. - Updates READMEs for app-facing packages to reflect the current support levels. Fixes https://github.com/flutter/flutter/issues/157106 ## Pre-Review Checklist [^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.1 年前
README.md

shared_preferences_android

The Android implementation of shared_preferences.

Usage

This package is endorsed, which means you can simply use shared_preferences normally. This package will be automatically included in your app when you do, so you do not need to add it to your pubspec.yaml.

However, if you import this package to use any of its APIs directly, you should add it to your pubspec.yaml as usual.

Options

The [SharedPreferencesAsync] and [SharedPreferencesWithCache] APIs can use DataStore Preferences or Android SharedPreferences to store data.

To use the Android SharedPreferences backend, use the SharedPreferencesAsyncAndroidOptions when using [SharedPreferencesAsync].

const SharedPreferencesAsyncAndroidOptions options =
    SharedPreferencesAsyncAndroidOptions(
        backend: SharedPreferencesAndroidBackendLibrary.SharedPreferences,
        originalSharedPreferencesOptions: AndroidSharedPreferencesStoreOptions(
            fileName: 'the_name_of_a_file'));

The [SharedPreferences] API uses the native Android SharedPreferences tool to store data.