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

套件詳情v0.16.1+2

ferry

Ferry 是一個簡單且強大的 Flutter 與 Dart 的 GraphQL 客戶端。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
2900
喜歡數
369
Pub 分數
160

安裝套件

flutter pub add ferry

套件介紹

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

Ferry 是一個輕量且高效能的 GraphQL 客戶端,專為 Flutter 和 Dart 應用設計。它提供一個乾淨、類型安全的介面,用於透過 GraphQL 查詢和變更資料,並內建支援快取、狀態管理以及透過訂閱實現的即時更新。Ferry 可順暢整合至 Flutter 項目中,並利用 Dart 的強型別系統確保編譯時期的正確性。它非常適合尋求跨多個平台簡單但強大之 GraphQL 互動解決方案的開發者。

適用情境

  • 從GraphQL API取得即時資料
  • 使用 GraphQL 變更管理應用狀態
  • 使用快取實現離線優先功能
  • 使用 GraphQL 建立可擴展的 Flutter 應用
  • 在 Web 和行動應用中整合 GraphQL 後端

主要特色

  • 類型安全的 GraphQL 查詢和變更
  • 內建快取和狀態管理
  • 對訂閱和即時更新的支援
  • 使用代碼生成的最小樣板
  • 跨平台相容性(Android、iOS、Web、macOS、Windows、Linux)

適合對象

  • 使用 GraphQL 的 Flutter 開發人員
  • 需要即時資料同步的應用程式
  • 優先考慮類型安全性與開發者體驗的專案
  • 使用 GraphQL 建構可擴展、可維護的 UI 的團隊
  • 尋求輕量級替代方案的開發者,以取代較大的 GraphQL 客戶端

使用建議

  • 需要代碼生成以實現最佳使用
  • 依賴於 GraphQL 模式定義
  • 對於初學者來說,GraphQL 的學習曲線
  • 與成熟替代方案相比,文件有限
  • 最適合已經致力於GraphQL架構的專案

原始 README

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

A simple, powerful GraphQL Client for Flutter and Dart

MIT License PRs Welcome Watch on GitHub Star on GitHub Watch on GitHub Discord

Documentation 📖

Features

  1. ✅ Fully Typed: work faster and safer with compile time checks and IDE autocomplete, including fully typed Cache reads and writes.
  2. 🔄 Built-In Code Generators: automatically generated immutable data classes for all your GraphQL Operations and Fragments, based on your schema.
  3. 🌐 Customizable Network Interface: highly customizable network interface using gql_link, allowing you to compose and extend Links.
  4. ✨ Normalized Optimistic Cache: keep data in sync with cache normalization and update your UI instantly with optimistic data.
  5. 💾 Multiple Data Stores: extensible Store interface with built-in MemoryStore and HiveStore (which uses hive for offline persistence).
  6. 📄 Refetch & Pagination: easily update responses with new data or combine multiple responses, allowing for seamless pagination.
  7. 📱 Flutter Widgets: Widgets for Queries, Mutations, and Subscriptions, available out of the box.
  8. 🧈 Smooth: Run queries in a separate Isolate to free up resources on the UI thread

Packages

This repo is a monorepo for ferry and related packages.

Pub Package Description
version package:ferry Stream-based GraphQL Client
version package:ferry_cache Normalized, strongly typed, optimistic cache
version package:ferry_exec Strongly typed GraphQL execution interface
version package:ferry_flutter Flutter Widgets for GraphQL Operations
version package:ferry_generator Dart Type Generator for GraphQL Operations
version package:ferry_store Data Persistence for ferry's cache
version package:ferry_hive_store Hive implementation of ferry_store
version package:normalize Normalization / denormalization of GraphQL data

所屬分類

依賴

依賴清單 11 項

原始碼儲存庫

使用此套件的專案