shared_preferences_watchos 0.1.0 copy "shared_preferences_watchos: ^0.1.0" to clipboard
shared_preferences_watchos: ^0.1.0 copied to clipboard

watchOS implementation of the shared_preferences plugin, backed by dart:ffi over NSUserDefaults for persistent key-value storage.

shared_preferences_watchos #

The watchOS implementation of shared_preferences.

Scaffolded with flutter-watchos plugin port and finished by hand as an FFI implementation over NSUserDefaults — see PORTING_REPORT.md.

Usage #

dependencies:
  shared_preferences: ^2.3.0
  shared_preferences_watchos: ^0.1.0

Both the classic SharedPreferences API and the newer SharedPreferencesAsync API work on the watch — no imports needed in app code.

How it works #

The store is a single JSON object persisted in NSUserDefaults under one private key. The native side only loads and saves that blob; all typing and filtering is done in Dart, so the five supported value types (bool, int, double, String, List<String>) round-trip exactly. Both the legacy SharedPreferencesStorePlatform and the async SharedPreferencesAsyncPlatform are registered against the same store, mirroring shared_preferences_foundation.

License #

The FlutterWatch Authors under a BSD-3-Clause license. See LICENSE for the full text.

0
likes
140
points
8
downloads

Documentation

API reference

Publisher

verified publisherflutterwatch.dev

Weekly Downloads

watchOS implementation of the shared_preferences plugin, backed by dart:ffi over NSUserDefaults for persistent key-value storage.

Homepage
Repository (GitHub)
View/report issues

Topics

#watchos #ffi #shared-preferences #storage

License

BSD-3-Clause (license)

Dependencies

ffi, flutter, shared_preferences_platform_interface

More

Packages that depend on shared_preferences_watchos

Packages that implement shared_preferences_watchos