Files
universal_ble/example/lib/data/prefs_async.dart
T
Foti Dim 8c75e3965f Integrate SharedPreferencesAsync for improved preferences handling
- Added a new `prefs_async.dart` file to encapsulate the usage of `SharedPreferencesAsync`.
- Updated `ScanController`, `StorageService`, and `ScannerScreen` to utilize the new async preferences methods, enhancing performance and code clarity.
- Modified `devtools_options.yaml` to enable the `shared_preferences` extension.
- Refactored the `FlashOnUpdateWidget` to improve the outline animation and added a customizable border radius.
- Adjusted the favorite services loading mechanism in `PeripheralDetailPage` to be asynchronous, ensuring better state management.
2026-02-09 22:24:41 +01:00

6 lines
247 B
Dart

import 'package:shared_preferences/shared_preferences.dart';
/// Shared [SharedPreferencesAsync] instance for the example app.
/// Use this instead of the legacy [SharedPreferences.getInstance()] API.
final prefsAsync = SharedPreferencesAsync();