MarekRudzki / TalkBridge

Voice translator
3 stars 2 forks source link

macos connectivity error #7

Closed flutter-painter closed 7 months ago

flutter-painter commented 7 months ago

Hi, great app, but had to comment out the bit in the initState of home_screen.dart

// _internetSubscription =
//     InternetConnectionChecker().onStatusChange.listen((status) {
//   if (status == InternetConnectionStatus.disconnected) {
//     print('is being stupid?');
//     setState(() {
//       hasInternet = false;
//     });
//   } else {
//     setState(() {
//       hasInternet = true;
//     });
//   }
// });

For some reason this considers me as offline. I use the same package with success elsewhere, yet asynchronously like this :

return await InternetConnectionChecker().hasConnection;

MarekRudzki commented 7 months ago

Hi. Honestly I have no idea why the app detects that you are offline. I have tested it on several devices and it has always worked fine. Thank you for your change suggestion but unfortunately I cannot use it. It checks the state of the connection at a given point in the code, and I want the feature to actively listen for changes in connection status.