搜尋套件、儲存庫與 APP 分類

套件詳情v1.2.10

orange

Orange 數據庫超快且易用,是現代的鍵值儲存。可在任何地方運行,無需 build_runner。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
737
喜歡數
22
Pub 分數
125

安裝套件

flutter pub add orange

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Orange 是一個高效率、現代化的鍵值儲存,專為跨所有平台的簡潔與速度設計。它提供持久性儲存且設定簡單——不需要 build_runner——非常適合需要快速可靠資料存取的應用程式。基於 Dart 構建,可在 Android、iOS、Web、macOS、Windows 和 Linux 上順暢運作。其輕量級設計與直覺的 API 讓開發者能快速實作本機資料持久化,無需樣板程式碼或複雜設定。

適用情境

  • 儲存應用偏好設定
  • 快取頻繁存取的資料
  • 離線優先的應用程式狀態管理
  • 簡單的本機資料持久化
  • 使用者會話管理

主要特色

  • 超快讀寫操作
  • 無 build_runner 依賴
  • 跨平台相容性
  • 最小 API 表面
  • 自動數據持久化
  • 輕量且易於整合

適合對象

  • 小型到中型應用
  • 原型和MVP
  • 需要離線功能的應用程式
  • 尋求簡單持久化的開發者
  • 專案避免程式碼產生

使用建議

  • 不適合複雜查詢
  • 僅限鍵值儲存
  • 無內建資料同步
  • 最適合簡單的資料結構
  • 不適合大型數據集

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

pub package GitHub

Orange Database 🍊

Discord Server Invite Kakao_Talk

Features

  • ✨ Super Fast Speed 100 x faster than SharedPreference
  • 🦄 Super Easy: same api as SharedPreference
  • 🚀 All Environment Work: Working on Android, iOS, Web, Mac, Windows, Linux even cli.
  • 🌐 No Build Runner: Do not waste your time on build_runner

Installation

flutter pub add orange

Usage

await Orange.init();

Orange.setString('orange', 'is delicious! 🍊');

String? orange = Orange.getString('orange');
print(orange); // is delicious! 🍊

Orange.remove('orange');

you got all usage of Orange now! 🎉

Benchmark

read & write 10000 times with Orange Database 🍊 and shared_preferences

orange 🍊 write performance test time: 3 ms
orange 🍊 read performance test time: 1 ms

shared_preferences write performance test time: 49228 ms
shared_preferences read performance test time: 28 ms

hive write performance test time: 1538 ms
hive read performance test time: 4 ms

sembast write performance test time: 14884 ms
sembast read performance test time: 146 ms

you can re run the benchmark test this repository

Advanced Usage

Check Saved Disk Time

if you want to check if the data is saved on disk, you can use Orange.isSavedToDisk() method.

bool isSaved = await Orange.isSavedToDisk();
print(isSaved); // true
Support List & Map

note that only support string , int , double , bool type in List and Map.

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。