I am looking for a way to check an internet connection from my flutter app. I tried to follow processes below.
use lookup
final result = await InternetAddress.lookup('example.com')and checkresult.isNotEmpty && result[0].rawAdress.isNotEmptyuse internet_connection_checker plugin
final result = await InternetConnectionChecker().hasConnection
My test device(real device) is connected to wifi, But need to be logged in to allow using it (but not logged in at that time). It appear that the result always return true even if the app can't use the internet.
additional information
When I try to use the Internet through the address (1.1.1.1, google.com, example.com, etc.) in my device's browser It always redirects to the login page. I think this might be a problem why internet status check always return true.
Does anyone know what I might have done wrong? or what do I have to do to get what I want?
Thank you