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

插件详情v1.0.3

dart_frog_web_socket

Dart Frog 的 WebSocket 支持 — 一个快速、轻量的 Dart 后端框架。

AndroidiOSmacOSWindowsLinux
近 30 天下载
9700
喜欢数
56
Pub 分数
160

安装插件

flutter pub add dart_frog_web_socket

插件介绍

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

Dart Frog WebSocket 是一个为 Dart Frog(一种轻量级且高性能的 Dart 后端框架)提供 WebSocket 集成的包。它实现了客户端与服务器之间的实时双向通信,非常适合需要实时更新的应用程序,例如聊天应用、协作工具或实时仪表板。该包无缝扩展了 Dart Frog 的路由和中间件系统,以最少的样板代码处理 WebSocket 连接。它支持消息广播、连接管理以及事件驱动编程模式。专为性能和简洁性设计,能够自然融入 Dart Frog 的模块化架构。

适合场景

  • 实时聊天应用
  • 实时数据流
  • 协作编辑工具
  • 游戏状态同步
  • 监控和仪表板更新

主要特点

  • 与 Dart Frog 的无缝集成
  • 双向实时通信
  • 消息广播支持
  • 事件驱动的连接处理
  • 所需最小配置

适合对象

  • 开发实时后端服务的开发者
  • 使用 Dart Frog 进行后端开发的团队
  • 需要低延迟通信的项目
  • 具有实时用户交互的应用程序
  • 后端系统优先考虑性能和简单性

使用建议

  • 需要 Dart Frog 框架
  • 仅限服务器端WebSocket处理
  • 无内置身份验证(必须单独实现)
  • 不适用于非 Dart Frog 项目
  • 客户端实现必须由外部处理

原始 README

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

Dart Frog Logo Dart Frog Logo

discord dart

ci coverage style: dart frog lint License: MIT Powered by Mason

A fast, minimalistic backend framework for Dart 🎯

Originally developed by Very Good Ventures 🦄

Documentation 📝

For official documentation, please visit https://dart-frog.dev.

Packages 📦

Package Pub
dart_frog pub package
dart_frog_auth pub package
dart_frog_cli pub package
dart_frog_gen pub package
dart_frog_lint pub package
dart_frog_test pub package
dart_frog_web_socket pub package

Quick Start 🚀

Prerequisites 📝

In order to use Dart Frog you must have the Dart SDK installed on your machine.

Installing 🧑‍💻
# 📦 Install the dart_frog cli from pub.dev
dart pub global activate dart_frog_cli
Creating a Project ✨

Use the dart_frog create command to create a new project.

# 🚀 Create a new project called "my_project"
dart_frog create my_project
Start the Dev Server 🏁

Next, open the newly created project and start the dev server via:

# 🏁 Start the dev server
dart_frog dev

💡 Tip: By default port 8080 is used. A custom port can be used via the --port option.

Create a Production Build 📦

Create a production build which includes a DockerFile so that you can deploy anywhere:

# 📦 Create a production build
dart_frog build
Create New Routes and Middleware 🛣️

To add new routes and middleware to your project, use the dart_frog new command.

# 🛣️ Create a new route "/hello/world"
dart_frog new route "/hello/world"

# 🛣️ Create a new middleware for the route "/hello/world"
dart_frog new middleware "/hello/world"

Goals 🎯

Dart Frog is built on top of shelf and mason and is inspired by many tools including remix.run, next.js, and express.js.

The goal of Dart Frog is to help developers effectively build backends in Dart. Currently, Dart Frog is focused on optimizing the process of building backends which aggregate, compose, and normalize data from multiple sources.

Dart Frog provides a simple core with a small API surface area in order to reduce the learning curve and ramp-up time for developers. In addition, Dart Frog is intended to help Flutter/Dart developers maximize their productivity by having a unified tech stack that enables sharing tooling, models, and more!

Extensions 💻

  • VSCode: extends VSCode with support for Dart Frog and provides tools for effectively managing Dart Frog projects within VSCode.

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。