mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
WIP - Provider refactorings
This commit is contained in:
@@ -63,9 +63,9 @@ class _ServerAddressFormFieldState extends State<ServerAddressFormField> {
|
||||
}
|
||||
//https://stackoverflow.com/questions/49648022/check-whether-there-is-an-internet-connection-available-on-flutter-app
|
||||
setState(() => _reachabilityStatus = ReachabilityStatus.testing);
|
||||
final isReachable =
|
||||
await Provider.of<ConnectivityStatusService>(context, listen: false)
|
||||
.isServerReachable(address);
|
||||
final isReachable = await context
|
||||
.read<ConnectivityStatusService>()
|
||||
.isServerReachable(address);
|
||||
if (isReachable) {
|
||||
setState(() => _reachabilityStatus = ReachabilityStatus.reachable);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user