搜索插件、代码仓与 APP 分类

插件详情v7.3.2

connectivity_plus

用于在 Android 和 iOS 上发现网络(Wi-Fi 和移动/蜂窝)连接状态的 Flutter 插件。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
443万
喜欢数
4100
Pub 分数
160

安装插件

flutter pub add connectivity_plus

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

connectivity_plus 是一个 Flutter 插件,可让应用在 Android、iOS、Web、macOS、Windows 和 Linux 上检测并响应网络连接变化。它提供有关当前活动连接类型(如 WiFi、移动数据或无连接)的实时信息,使开发者能够构建适应网络可用性的健壮应用程序。该包提供了跨平台的简单且一致的 API,非常适合处理离线场景、同步数据或显示网络状态指示器。

适合场景

  • 实时监控网络状态
  • 优雅地处理离线模式
  • 显示连接指示器
  • 自动重试失败的请求
  • 根据连接类型优化数据使用

主要特点

  • 跨平台支持(Android、iOS、Web、macOS、Windows、Linux)
  • 实时连接状态更新
  • 检测WiFi和移动数据连接
  • 同时支持初始状态和基于流的监控
  • 简单直观的 API,设置最少

适合对象

  • 需要可靠网络感知的应用程序
  • 离线可用的应用程序
  • 需要连接上下文的数据密集型服务
  • 针对多个平台且行为一致的开发者

使用建议

  • 在 Android 和 iOS 上需要平台特定的权限
  • Web 支持可能因浏览器而存在限制
  • 无法检测互联网访问——仅本地连接
  • 可能需要额外的逻辑来验证实际的互联网连通性

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Plus plugins

build

all_plugins GitHub Workflow Status Follow on Twitter


PlusPlugins is a set of Flutter plugins that is developed based on plugins, which previously existed as a part of Flutter plugins, with extra functionalities, support for more platforms and better maintenance.

Feedback and Pull Requests are most welcome!

Plugins

Table of contents:


battery_plus

battery_plus pub points

Flutter plugin for accessing information about the battery state (full, charging, discharging) on Android and iOS.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

connectivity_plus

connectivity_plus pub points

Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

device_info_plus

device_info_plus pub points

Flutter plugin providing detailed information about the device (make, model, etc.), and Android or iOS version the app is running on.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

network_info_plus

network_info_plus pub points

Flutter plugin for discovering network info.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ❌ ✅ ✅

package_info_plus

package_info_plus pub points

Flutter plugin for querying information about the application package, such as CFBundleVersion on iOS or versionCode on Android.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

sensors_plus

sensors_plus pub points

Flutter plugin for accessing accelerometer, gyroscope, magnetometer and barometer sensors.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ❌ ✅ ❌ ❌

share_plus

share_plus pub points

Flutter plugin for sharing content via the platform share UI, using the ACTION_SEND intent on Android and UIActivityViewController on iOS.

[readme] [code]

Platform Support
Android iOS macOS Web Linux Windows
✅ ✅ ✅ ✅ ✅ ✅

android_alarm_manager_plus

android_alarm_manager_plus pub points

Flutter plugin for accessing the Android AlarmManager service, and running Dart code in the background when alarms fire.

[readme] [code]

Platform Support
Android
✅

android_intent_plus

android_intent_plus pub points

Flutter plugin for launching Android Intents. Not supported on iOS.

[readme] [code]

Platform Support
Android
✅

Issues

Please file PlusPlugins specific issues, bugs, or feature requests in our issue tracker.

Plugin issues that are not specific to PlusPlugins can be filed in the Flutter issue tracker.

Contributing

If you wish to contribute a change to any of the existing plugins in this repo, please review our contribution guide and open a pull request.

Status

This repository is maintained by FlutterCommunity authors. Issues here are answered by maintainers and other community members on GitHub on a best-effort basis.

所属分类

依赖

依赖清单 5 项

源码仓库

使用此插件的项目

所在榜单