Skip to content

Commit

Permalink
refactor(websocket): remove CubitMaybeEmit in favor of SafeEmitMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
adar2378 committed Aug 23, 2023
1 parent 049bbf5 commit 289b5e8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'dart:async';
import 'dart:convert';

import 'package:djangoflow_bloc_extensions/djangoflow_bloc_extensions.dart';
import 'package:djangoflow_websocket/src/json_parsing_exception.dart';
import 'package:djangoflow_websocket/src/utils/mixins/cubit_maybe_emit_mixin.dart';
import 'package:flutter/widgets.dart';
import 'package:djangoflow_websocket/src/interfaces/djangoflow_websocket_cubit_base.dart';
import 'package:web_socket_channel/web_socket_channel.dart';
Expand All @@ -11,7 +11,7 @@ import 'package:web_socket_channel/status.dart' as status;
/// DjangoflowWebsocketCubit is a Cubit which manages a websocket connection to a server using [WebSocketChannel].
/// and emits [DjangoflowWebsocketState]s. It also handles automatic reconnection.
class DjangoflowWebsocketCubit extends DjangoflowWebsocketCubitBase
with CubitMaybeEmit {
with SafeEmitMixin {
StreamSubscription? _subscription;
WebSocketChannel? _channel;

Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions packages/djangoflow_websocket/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
bloc: ^8.1.1
flutter_bloc: ^8.1.2
freezed_annotation: ^2.2.0
djangoflow_bloc_extensions: ^0.0.1
web_socket_channel: ^2.4.0

dev_dependencies:
Expand Down

0 comments on commit 289b5e8

Please sign in to comment.