패키지, 저장소 및 앱 카테고리 검색

패키지 상세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에 저장된 데이터를 읽기 위해 설계된 플러터 패키지로, React Native 앱에서 플러터로의 데이터 마이그레이션을 원활하게 가능하게 합니다. 기존 스토리지 로직을 변경하지 않고 직렬화된 키-값 쌍에 접근할 수 있는 간단한 방법을 제공합니다. 앱 전환 시 사용자 데이터를 유지하는 것이 중요한 상황에서 특히 유용합니다. 안드로이드 및 iOS 플랫폼을 모두 지원하여 광범위한 호환성을 보장합니다. 네이티브 파일 시스템 접근을 활용해 데이터를 안전하게 추출하면서 무결성을 유지합니다.

사용 사례

  • React Native에서 Flutter로 데이터 마이그레이션
  • 앱 전환 중 사용자 설정 유지
  • 레거시 AsyncStorage 파일 읽기
  • 하이브리드 앱 개발 단계 지원
  • 프레임워크 간 데이터 이식성 활성화

주요 기능

  • AsyncStorage JSON 파일 읽기
  • 크로스 플랫폼(안드로이드 및 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 개

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.