fluttercommunity / fluttercommunity/plus_plugins
[Request]: Return if the connection uses a VPN instead of returning VPN as a result
- Vorherrschende Sprache
- Dart
- Sterne
- 1.9k
- Forks
- 1.3k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### 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.
Beitragsleitfaden
Rechercherichtung
Der Payload nennt keine Dateien oder Tests. Beginne im connectivity_plus-Plugin, indem du die aktuelle Connectivity-Enum-API und ihre Android- und iOS-Implementierungen lokalisierst, und prüfe anschließend, wie VPN-Informationen auf jeder Plattform bereitgestellt werden; abgeschlossen ist die Arbeit, wenn die vorgeschlagene API den VPN-Status vom zugrunde liegenden Konnektivitätstyp unterscheidet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- dart, flutter
- Bereich
- mobile-dev, networking
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 30/100