We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how come snapshot.connectionState is always waiting when turning wifi off to on ?
once the future connects to an api, it cant resolve the hostname, like it's still offline. thoughts?
this is how it looks like
OfflineBuilder( connectivityBuilder: (context, connectivity, child) { final bool connected = connectivity != ConnectivityResult.none; print('connected='+connected.toString()); return connected ? child : Stack( fit: StackFit.expand, children: [ Positioned( height: 24.0, left: 0.0, right: 0.0, child: Container( color: connected ? Color(0xFF00EE44) : Color(0xFFEE4400), child: Center( child: Text("${connected ? 'ONLINE' : 'OFFLINE'}"), ), ), ), Center( child: new Text( 'Yay!', ), ), ], ); }, child: FutureBuilder<Root?>( future: _fetch, builder: (context, snapshot) { print(snapshot.connectionState); if (snapshot.hasData) return _getScaffoldBody(snapshot.connectionState); return Center(child: CircularProgressIndicator()); } ), ),
The text was updated successfully, but these errors were encountered:
No branches or pull requests
how come snapshot.connectionState is always waiting when turning wifi off to on ?
once the future connects to an api, it cant resolve the hostname, like it's still offline. thoughts?
this is how it looks like
The text was updated successfully, but these errors were encountered: