getConnection method
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};