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

插件详情v6.1.0

protobuf

协议缓冲区支持的运行时库。与 package:protoc_plugin 一起使用,以生成您的 '.proto' 文件的 Dart 代码。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
309万
喜欢数
256
Pub 分数
150

安装插件

flutter pub add protobuf

插件介绍

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

protobuf 包为 Dart 提供了 Protocol Buffers 的运行时支持,可实现结构化数据的高效序列化和反序列化。它与 protoc_plugin 配合使用,能够从 .proto 定义文件生成 Dart 类,确保跨平台的类型安全且性能优异的数据交换。适用于需要高性能数据通信的应用程序,例如 API、微服务或实时系统。该库兼容所有主要平台,包括 Android、iOS、Web、macOS、Windows 和 Linux。

适合场景

  • API 数据序列化
  • 跨平台数据交换
  • 实时通信系统
  • 微服务后端集成
  • 高效的二进制数据存储

主要特点

  • 类型安全的代码生成
  • 高性能序列化
  • 跨平台兼容性
  • 支持 .proto 文件定义
  • 最小的运行时开销

适合对象

  • 开发可扩展的 API 的开发者
  • 在工作流程中使用 Protocol Buffers 的 Teams
  • 需要紧凑数据格式的应用程序
  • 跨平台移动和网页应用
  • 高吞吐量数据处理系统

使用建议

  • 需要使用 protoc_plugin 进行设置
  • 需要 .proto 文件以进行代码生成
  • 限制为 Protocol Buffers 格式
  • 在模式更改后手动更新
  • Protocol Buffers 语法的学习曲线

原始 README

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

Protobuf support for Dart

Protocol Buffers (protobuf) are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.

This repository is home to packages related to protobuf support for Dart.

Package Description Published Version
protobuf Runtime library for protocol buffers support. pub package
protoc_plugin A protobuf protoc compiler plugin used to generate Dart code. pub package
benchmarks Benchmarks for various protobuf functions.

Publishing automation

For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目