Search packages, repositories and app categories

Package detailsv3.0.3

web_socket_channel

StreamChannel wrappers for WebSockets. Provides a cross-platform WebSocketChannel API, a cross-platform implementation of that API that communicates over an underlying StreamChannel.

AndroidiOSWebmacOSWindowsLinux
30-day downloads
12.9M
Likes
1.7K
Pub points
150

Install package

flutter pub add web_socket_channel

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

The web_socket_channel package provides a cross-platform API for WebSocket communication, wrapping StreamChannel to enable consistent WebSocket handling across platforms. It offers a unified interface for establishing and managing WebSocket connections, abstracting underlying platform differences. Built on top of Dart's StreamChannel, it supports bidirectional data flow through streams, making it ideal for real-time applications. The package is designed for use in Flutter apps targeting Android, iOS, Web, macOS, Windows, and Linux, ensuring seamless integration with existing stream-based architectures.

Use cases

  • Real-time chat applications
  • Live data updates in dashboards
  • Multiplayer game synchronization
  • IoT device communication
  • Streaming analytics data

Key features

  • Cross-platform WebSocket support
  • StreamChannel-based API
  • Bidirectional data streaming
  • Consistent interface across platforms
  • Built-in error handling and reconnection logic

Suitable for

  • Flutter developers building real-time features
  • Apps requiring persistent server connections
  • Projects targeting multiple platforms
  • Stream-based data architectures
  • Applications needing reliable WebSocket transport

Considerations

  • Requires underlying StreamChannel implementation
  • May need additional error handling for production use
  • Not suitable for non-WebSocket protocols
  • Depends on Dart's async capabilities
  • Limited to WebSocket-specific use cases

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

Build Status

A composable, Future-based library for making HTTP requests.

package:http contains a set of high-level functions and classes that make it easy to consume HTTP resources. It's multi-platform, and supports mobile, desktop, and the browser.

Packages

Package Description Version
cronet_http An Android Flutter plugin that provides access to the Cronet HTTP client. pub package
cupertino_http A macOS/iOS Flutter plugin that provides access to the Foundation URL Loading System. pub package
flutter_http_example An Flutter app that demonstrates how to configure and use package:http. —
http A composable, multi-platform, Future-based API for HTTP requests. pub package
http2 A HTTP/2 implementation in Dart. pub package
http_client_conformance_tests A library that tests whether implementations of package:http's Client class behave as expected.
http_multi_server A dart:io HttpServer wrapper that handles requests from multiple servers. pub package
http_parser A platform-independent package for parsing and serializing HTTP formats. pub package
http_profile A library used by HTTP client authors to integrate with the DevTools Network View. pub package
ok_http An Android Flutter plugin that provides access to the OkHttp HTTP client and the OkHttp WebSocket API. pub package
web_socket Any easy-to-use library for communicating with WebSockets that has multiple implementations. pub package
web_socket_channel StreamChannel wrappers for WebSockets. Provides a cross-platform WebSocketChannel API. package issues
web_socket_conformance_tests A library that tests whether implementations of package:web_socket's WebSocket class behave as expected.

Contributing

If you'd like to contribute to any of these packages, see the Contributing Guide.

Categories

Dependencies

Dependency list 5 items

Source repository

Projects using this package