client_sse 1.0.0-beta
client_sse: ^1.0.0-beta copied to clipboard
Dart package to help consume SSE API. It consumes server sent events by returning parsed model of the event, id, and the data
Use this package as a library
Depend on it
Run this command:
With Flutter:
$ flutter pub add client_sseThis will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):
dependencies:
client_sse: ^1.0.0-betaAlternatively, 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:client_sse/constants/sse_request_type_enum.dart';
import 'package:client_sse/flutter_client_sse.dart';
import 'package:client_sse/retry_options.dart';
import 'package:client_sse/sse_event_model.dart';
import 'package:client_sse/utils.dart';