Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frezyx/storage_view
Flutter inspector tool for any database, storage and shared_preferences.
https://github.com/frezyx/storage_view
dart dart-library dart-package database database-management flutter flutter-package flutter-plugin inspector localstorage sharedpreferences sqlite storage
Last synced: about 2 months ago
JSON representation
Flutter inspector tool for any database, storage and shared_preferences.
- Host: GitHub
- URL: https://github.com/frezyx/storage_view
- Owner: Frezyx
- License: mit
- Created: 2022-06-25T18:39:02.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-30T05:57:01.000Z (9 months ago)
- Last Synced: 2024-11-01T19:42:33.177Z (2 months ago)
- Topics: dart, dart-library, dart-package, database, database-management, flutter, flutter-package, flutter-plugin, inspector, localstorage, sharedpreferences, sqlite, storage
- Language: C++
- Homepage: https://pub.dev/packages/storage_view
- Size: 12.4 MB
- Stars: 14
- Watchers: 1
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
StorageView 🔎
Flutter inspector tool for any database, storage and shared_preferences.
Check and modify database values from UI of application.Show some ❤️ and star the repo to support the project!
## Getting started
Follow these steps to use this package### Add dependency
```yaml
dependencies:
storage_view: ^0.1.0-dev.4
```### Add import package
```dart
import 'package:storage_view/storage_view.dart';
```### Implement driver
The package uses a driver [StorageDriver](https://github.com/Frezyx/storage_view/blob/main/packages/storage_view/lib/src/models/storage_driver.dart) to interact with the database.
In order to connect your database you should use one of available drivers:- [shared_preferences_storage_view_driver](https://github.com/Frezyx/storage_view/tree/main/packages/shared_preferences_storage_view_driver) that works with [shared_preferences](https://pub.dev/packages/shared_preferences)
See [example](https://github.com/Frezyx/storage_view/tree/main/packages/shared_preferences_storage_view_driver/example) for more information
- [flutter_secure_storage_view_driver](https://github.com/Frezyx/storage_view/tree/main/packages/flutter_secure_storage_view_driver) that works with [flutter_secure_storage](https://pub.dev/packages/flutter_secure_storage)
See [example](https://github.com/Frezyx/storage_view/tree/main/packages/flutter_secure_storage_view_driver/example) for more informationOr create your own StorageDriver implementation like there:
```dart
class MockStorageDriver implements StorageDriver {
final _data = {
'test_id' : 'test',
};@override
FutureOr> getKeys() {
return _data.keys.toSet() as Set;
}@override
FutureOr read(String key) {
return _data[key] as T;
}@override
FutureOr write({required String key, required T value}) {
_data[key] = value;
}@override
FutureOr delete(String key) {
_data.remove(key);
}
}
```### Implement StoargeView
After the driver was connected, you can use StorageView anywhere in your application.
```dart
final _mockStorageDriver = MockStorageDriver();
Scaffold(
body: StorageView(storageDriver: _mockStorageDriver),
),
```## Additional information
The project is under development and ready for your pull-requests and issues 👍
Thank you for support ❤️For help getting started with 😍 Flutter, view
[online documentation](https://flutter.dev/docs), which offers tutorials,
samples, guidance on mobile development, and a full API reference.