fluttercommunity / fluttercommunity/plus_plugins

[Request]: Return if the connection uses a VPN instead of returning VPN as a result

Aperta
#1,472 1 commento 7 reazioni 0 assegnatari Vedi su GitHub
enhancement triage
Lingua principale
Dart
Stelle
1.9k
Fork
1.3k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Plugin

connectivity_plus

### Use case

When using the plugin to detect if the user is on mobile data, vs non metered networks currently there is no way to tell if a user is connected when using a VPN. Because only VPN is returned we can't know if it's actually connected to the internet, or if it's a metered connection.

### Proposal

I would propose a breaking change. Instead of returning an enum, return an object similar to this:

```dart
class ConnectivityResult {
final ConnectivityType type; // An enum with the current enum values except vpn
final bool vpnConnection;
}

```

This allows actually checking the connectivity type when using a VPN. Currently there is no way to do that, at least on Android. On iOS since the VPN information is not exposed the flag could be false.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Il payload non indica file né test. Inizia nel plugin connectivity_plus individuando l’API attuale dell’enum di connettività e le relative implementazioni Android e iOS, quindi esamina come vengono esposte le informazioni VPN su ciascuna piattaforma; il lavoro è completato quando l’API proposta distingue lo stato VPN dal tipo di connettività sottostante.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
dart, flutter
Ambito
mobile-dev, networking
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.