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

插件详情v1.1.4

mdns_plugin

适用于 iOS 和 Android 的 mDNS 服务发现插件,可根据本地网络上的服务发现生成事件。

近 30 天下载
47
喜欢数
8
Pub 分数
40

安装插件

flutter pub add mdns_plugin

插件介绍

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

mdns_plugin 是一个 Flutter/Dart 包,可在 iOS 和 Android 设备上启用 mDNS(多播 DNS)服务发现。它允许应用程序检测并与其他本地网络上的服务进行交互,例如打印机、智能家居设备或自定义网络服务。当发现新服务或服务不可用时,该插件会发出事件,从而实现实时网络感知。它非常适合需要在本地环境中实现零配置网络的应用程序。

适合场景

  • 发现本地网络设备
  • 连接到物联网设备
  • 启用零配置网络
  • 构建本地服务集成
  • 实时设备存在检测

主要特点

  • 跨平台支持(iOS 和 Android)
  • 事件驱动的服务发现
  • 本地网络服务扫描
  • 用于监听服务事件的简单 API
  • 轻便高效

适合对象

  • 物联网应用开发者
  • 本地网络工具构建者
  • 智能家居应用开发者
  • 网络感知移动应用
  • 需要自动设备检测的应用程序

使用建议

  • 需要本地网络访问
  • 可能无法在某些防火墙后工作
  • 仅限本地子网发现
  • 无内置加密或身份验证
  • 性能取决于网络状况

原始 README

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

flutter

CircleCI

This repository includes Flutter application and packages.

The applications here are developed on the v1 branch and currently a configuration is included to use CircleCI to build Android APK's when merged into the master branch. The APK images can be downloaded as artifacts from CircleCI once built.

mDNS Plugin

A Flutter mDNS package, which is published at pub.dev. The example which demonstrates the use is here.

gRPC Plugin

A package which provides connection and reflection for remote gRPC services. Please see pub.dev for the package information, and the example which demonstrates the use is here.

Notes on developing a gRPC Client

On a Macintosh, use the following commands in order to make a working gRPC installation, assuming you have Homebrew already installed:

bash% brew install grpc && brew upgrade grpc

We assume that the protocol buffer files (with extension .proto) are in the folder lib/protobuf of your project. The generated output should go into the lib/providers folder.

For Macintosh, there is a script in order to generate the Dart files:

bash% git clone git@github.com:djthorpe/flutter.git
bash% cd flutter/grpc_client
bash% install -d lib/providers/google/protobuf
bash% install -d lib/providers/grpc/reflection/v1alpha
bash% source ../genproto-darwin.sh
bash% flutter test && flutter build ios

所属分类

源码仓库

使用此插件的项目

暂无相关数据。