websocket_reconnect 0.0.1 copy "websocket_reconnect: ^0.0.1" to clipboard
websocket_reconnect: ^0.0.1 copied to clipboard

The "websocket_reconnect" is a convenient package for Flutter developers to automatically reconnect to a WebSocket when connection is lost. It eliminates the need for manual reconnection logic. Simply [...]

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add websocket_reconnect

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  websocket_reconnect: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:websocket_reconnect/websocket_reconnect.dart';
1
likes
130
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

The "websocket_reconnect" is a convenient package for Flutter developers to automatically reconnect to a WebSocket when connection is lost. It eliminates the need for manual reconnection logic. Simply define your WebSocket connection and pass it to the "AutoReconnectWebSocket" constructor. The package monitors the connection and automatically reconnects it if lost. You can customize the retry interval and set a maximum number of attempts.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, flutter, plugin_platform_interface, web_socket_channel

More

Packages that depend on websocket_reconnect

Packages that implement websocket_reconnect