onDisconnected method

  1. @override
void onDisconnected(
  1. void callback(
    1. String? reason
    )
)
override

Implementation

@override
void onDisconnected(void Function(String? reason) callback) {
  _stateChannel.receiveBroadcastStream().listen((call) async {
    if (!call['connected']) {
      callback(call['reason']);
    }
  });
}