Search packages, repositories and app categories

Package detailsv1.0.0

async_storage_reader

Flutter package to read AsyncStorage data from React Native apps, aiding migration to Flutter without data loss.

AndroidiOS
30-day downloads
209
Likes
33
Pub points
150

Install package

flutter pub add async_storage_reader

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

A Flutter package designed to read data stored in React Native's AsyncStorage, enabling seamless data migration from React Native apps to Flutter. It provides a straightforward way to access serialized key-value pairs without requiring changes to existing storage logic. The package is particularly useful during app transitions where preserving user data is critical. It supports both Android and iOS platforms, ensuring broad compatibility. By leveraging native file system access, it safely extracts data while maintaining integrity.

Use cases

  • Migrating data from React Native to Flutter
  • Preserving user preferences during app transition
  • Reading legacy AsyncStorage files
  • Supporting hybrid app development phases
  • Enabling data portability between frameworks

Key features

  • Reads AsyncStorage JSON files
  • Cross-platform (Android & iOS)
  • Minimal setup required
  • Safe data extraction
  • Compatible with React Native's storage format

Suitable for

  • Developers migrating from React Native to Flutter
  • Teams managing app transitions
  • Projects requiring data continuity
  • Hybrid app maintenance
  • Data recovery scenarios

Considerations

  • Only reads data—does not write
  • Requires proper file path access
  • Not for real-time sync
  • Limited to AsyncStorage format
  • Does not support encryption

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Migrate Local Data from React Native to Flutter - async_storage_reader

A Flutter package created to assist in migrating data from a React Native app by accessing and reading AsyncStorage for Android and iOS. It allows reading of AsyncStorage data from react native app, like user session tokens, preferences, other configurations, and cached data are preserved without logging out or data loss during migration to a new Flutter app.

Note: Please ensure that both the React Native and Flutter apps have the same bundle ID (for iOS) and application ID (for Android).

Why This Package?

When migrating from React Native to Flutter, one of the most significant challenges is ensuring that existing data stored in the app is preserved. This could include user session tokens, settings, cached preferences, or any other key-value pairs that were previously stored using React Native's AsyncStorage. Without this, users might lose their preferences or be logged out. This package solves the problem by offering an easy way to access all AsyncStorage in your new Flutter app.

Demo Preview

Demo Preview

Platform Support for async_storage_reader

The async_storage_reader package provides support for both Android and iOS platforms.

Features

  • Read individual key-value pairs from React Native's AsyncStorage.
  • Retrieve all key-value pairs stored in AsyncStorage.
  • Support for both Android and iOS platforms.
  • Prevent user logouts during app migrations by retrieving session tokens or other vital data.
  • Provides methods to read, remove, and clear storage data.

Getting Started

To use this package, add async_storage_reader as a dependency in your pubspec.yaml file:

dependencies:
  async_storage_reader: ^1.0.0

Example Usage

import 'package:async_storage_reader/async_storage_reader.dart';

final reader = AsyncStorageReader();

String? value = await reader.getItem('your_key');
print(value);  

Map<String, String> allItems = await reader.getAllItems();
print(allItems);  

bool success = await reader.removeItem('your_key');
print(success);  

bool success = await reader.clear();
print(success);  

License

This project is licensed under the MIT License - see the LICENSE file for details.

Connect With Me

GitHub: bilalrehman08 Linkedin: bilalrehman08 [YouTube: Bilal Rehman][youtube] Instagram: bilalrehman08 [Gmail: bilalrehman080808@gmail.com][gmail]

[gmail]: mailto:bilalrehman080808@gmail.com [youtube]: https://www.youtube.com/@bilalrehman08 [license]: https://github.com/BilalRehman08/Async-Storage-Reader/blob/main/LICENSE

Categories

Dependencies

Dependency list 3 items

Source repository

Projects using this package

No data available yet.