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

套件詳情v1.0.1+3

flutter_dino

用於透過自訂組件實現無縫網路連接處理的 Flutter 套件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
5
喜歡數
13
Pub 分數
140

安裝套件

flutter pub add flutter_dino

套件介紹

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

Flutter Dino 是一個 Flutter 套件,旨在簡化跨多個平台的網路連接管理。它提供可自訂的元件,以視覺方式呈現網路狀態,讓開發者能夠建立能根據線上或離線狀態調整的響應式 UI。支援 Android、iOS、Web、macOS、Windows 和 Linux,確保在任何目標平台上都能保持一致的連接處理。透過簡單的 pub add 命令即可無縫整合至現有專案中。非常適合需要即時網路感知與使用者回饋的應用。

適用情境

  • 即時網路狀態監控
  • 離線模式 UI,帶有自定義指示器
  • 連接變更期間應用行為的無縫銜接
  • 跨平台連接解決方案
  • 透過視覺網路反饋提升使用者體驗
  • 基於連接狀態的動態內容加載

主要特色

  • 可自訂的連接狀態小工具
  • 對六大主要平台的支援
  • 透過 pub add 輕鬆整合
  • 即時連接更新
  • 輕量且高效
  • 可設定的逾時和重試設定

適合對象

  • 需要強大網路處理能力的應用程式
  • 開發跨平台應用的開發者
  • 以使用者體驗為導向的應用程式
  • 需要離線優先設計的項目
  • 重視開發者體驗的團隊

使用建議

  • 移動平台需要正確的權限處理
  • 可能需要額外的樣式來處理複雜的使用者介面
  • 依賴於平台特定的網路 API
  • 不適用於高頻率網路輪詢
  • 僅限基本連接性檢查(無頻寬分析)

原始 README

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

Flutter Dino

pub package

package publisher

GitHub code size

Flutter Dino is a Flutter package that provides seamless internet connectivity handling in your Flutter applications. It allows you to easily manage and customize your app's behavior when internet connectivity changes.

Features

  • Easy Integration: Simple initialization process with minimal configuration
  • Customizable: Full control over how your app handles connectivity changes
  • Global Access: Works across your entire application
  • Custom UI Support: Ability to show custom widgets when internet is unavailable
  • Automatic Handling: Manages connectivity state changes without manual intervention

Installation

Add the following line to your pubspec.yaml file under dependencies:

dependencies:
  flutter_dino: latest_version

Then run:

flutter pub get

Usage

To use Flutter Dino in your Flutter application:

Import the Package
import 'package:flutter_dino/flutter_dino.dart';
Basic Implementation

Here's a simple example of how to integrate Flutter Dino in your app:

import 'package:flutter/material.dart';
import 'package:flutter_dino/flutter_dino.dart';

void main() async {
  final navigatorKey = GlobalKey<NavigatorState>();
  
  WidgetsFlutterBinding.ensureInitialized();
  
  await FlutterDino.initialize(
    config: FlutterDinoConfig(
      navigatorKey: navigatorKey,
    ),
  );
  
  runApp(
    MaterialApp(
      navigatorKey: navigatorKey,
      home: HomePage(),
      navigatorObservers: [
        FlutterDino.instance.navigatorObserver,
      ],
    ),
  );
}
Customization Options

You can customize Flutter Dino's behavior using FlutterDinoConfig:

FlutterDinoConfig(
  navigatorKey: navigatorKey,
  showNoInternetDialog: true,  // Control automatic handling
  noInternetReplacement: YourCustomWidget(),  // Custom UI when offline
)

Demo

License

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

Contributors

All Contributors

YudizAndroidKishan
YudizAndroidKishan

🚇 ⚠️ 💻

Contributions

Contributions are welcome! Please open an issue or submit a pull request on the GitHub repository if you would like to contribute to Flutter Dino.

Support

If you encounter any issues or have questions, feel free to open an issue on GitHub.

Visitors Count

Loading

所屬分類

依賴

依賴清單 2 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。