getConnection method

  1. @override
Future<Map<String, Object?>> getConnection()
override

Returns the current connection, in the same format as the connectionChanged event.

Implementation

@override
Future<Map<String, Object?>> getConnection() async => isConnected
    ? {'connected': true, 'platform': _platform!.name}
    : {'connected': false};