パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.0

async_storage_reader

React Native アプリの AsyncStorage データを読み取るための Flutter パッケージ。データ損失なしに Flutter への移行を支援します。

AndroidiOS
30日間ダウンロード
209
いいね数
33
Pub ポイント
150

パッケージをインストール

flutter pub add async_storage_reader

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

React NativeのAsyncStorageに格納されたデータを読み取ることを目的としたFlutterパッケージで、React NativeアプリからFlutterへのシームレスなデータ移行を可能にします。既存のストレージロジックを変更せずに、シリアル化されたキーと値のペアにアクセスする簡単な方法を提供します。アプリの移行時にユーザーのデータを保持することが重要な場合に特に役立ちます。AndroidおよびiOSの両方のプラットフォームをサポートしており、広範な互換性を確保しています。ネイティブファイルシステムへのアクセスを利用して、データを安全に抽出しつつ完全性を保ちます。

用途

  • React Native から Flutter へのデータ移行
  • アプリの移行中にユーザーの設定を保持する
  • レガシーな AsyncStorage ファイルの読み取り
  • ハイブリッドアプリ開発フェーズのサポート
  • フレームワーク間でのデータポータビリティの有効化

主な機能

  • AsyncStorage JSON ファイルを読み取ります
  • クロスプラットフォーム(Android および iOS)
  • 最小限のセットアップが必要
  • 安全なデータ抽出
  • React Native のストレージ形式と互換性があります

適している対象

  • React Native から Flutter への移行を行う開発者
  • アプリ移行を管理するチーム
  • データの継続性を必要とするプロジェクト
  • ハイブリッドアプリのメンテナンス
  • データ回復のシナリオ

注意事項

  • データの読み取りのみ—書き込みはしない
  • 適切なファイルパスへのアクセスが必要です
  • リアルタイム同期には対応していません
  • AsyncStorage形式に制限
  • 暗号化をサポートしていません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

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

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。