currentSession method

  1. @override
Future<Session?> currentSession()
override

Gets the current screenshare session. This may be a session waiting to start, the currently active session, or may be null if no session has been created.

Implementation

@override
Future<Session?> currentSession() async {
  try {
    var rvalue = await methodChannel.invokeMapMethod('currentSession');
    if (rvalue != null) {
      return Session._build(rvalue);
    }
  } on PlatformException catch (e) {
    print('Cannot get current session: $e');
  }
  return null;
}