How to determine country code in Flutter web - flutter

I need to assess which country the user is in. In Flutter android/iOS I usually would have used dart:io and collected the info by checking Platform.localeName... but this seems not to work in flutter web as the io package is not supported in web. Do I need to determine it by ip address? Is that possible? Any alternative suggestions of how to get the country code would be grateful

Related

Flutter - Get Current User Location

I saw that there are several methods to obtain the current user's location on flutter. I shortlisted it to two but cannot find which one would be more suitable and why. These are the flutter geolocator package and Google API.
Does someone have any experience using those? Which one would you recommend?
The app I am building needs high accuracy. I made a test and saw there is a little difference between the results obtained from the two. However, I have no idea which one is the most accurate.
Example:
Geolocator: Latitude = xx.xxx3127
Google API: Latitude =xx.xxx322
Geolocator is a good option to use for finding location
You can see the code in the attached link to find out how you can use it.
Flutter Geolocator and Google Maps: Show static location

Is there a way to find out if the user is online or not in flutter

Please I want to create an online or offline feature for users in my app
I tried onDisconnect in Firebase and it didn't work for me
You can use socket.io for flutter. When user open the app then socket will tell the server that specific user is connected.The user able to see other connected users. Here is a article of how to use socket.io in your project.
You can try pusher presence channels.
It is based on websockets, and it tells you who is connected to the channel (who is present). You can find the use cases for presence channels here.
click here to find out how to build presence channels.
I'm currently building an online and offline statusbar for a flutter app if a user is connected to a presence channel. If I have the working code I'll post an update.

How to get all mobile measurements in Android using dart and flutter

I tried to create an app the get all Device Information as the below link in git hub:
https://github.com/MHarooney/All-Device-Information
As I need to get these types of info below images:
and those Infos I get it when dialing this code *#*#4636#*#*, and I get this screen to access the Phone information as the below Image:
I searched a lot and can't find plugins give me this information using flutter and dart
I hope someone could help me to solve this!!
Edited:
Overall I want to create something like Open Signal application that access the mobile network or sim network as the below link:
https://play.google.com/store/apps/details?id=com.staircase3.opensignal&gl=NL
Why would you need the measurement of all android devices? Android devices have wide spread of screen sizes instead you can use mediaquery() widget to set multi layout screens instead of inputting raw width and height

Need Voip call like in Uber in Flutter

My app need a voip phone call to another person who is using this app and the phone number should not be the real phone number like in Uber. Can somebody please help, I searched in google and I could find nothing.
I was trying to add this feture in my crrunt project and find zegocloud they have good documentation on how to implement voice/video calling one-on-one and group too.
Here's the doc and here's the code snippet of basic implementation in the flutter.
Hope this will help you.
I would say the best option is to go with an open source WebRTC based solution if you are ready to self host the VoIP server. In this case you can consider using Pion VoIP package which is available even in flutter. See https://github.com/pion/ion-sdk-flutter
To avoid hosting and ready to pay some cash for the calls users make, consider Twilio or any other cheaper alternatives which can do the hosting for you, but gives API calls to use them in your app.
Hope this helps :)
I would suggest that you save the actual number with a key value pair example
{
'cell':'0000000000',
'fakeCell':'0123456789'
}
Then whenever you want to call through the app you do a quick lookup to get the real number.
also here is a WebRTC Plugin you can use

ngCordova - Get network name

I need for my app, to get the wifi's exact network name. With this name, the app will generate a set of results completely diferent of the results generated outside this network.
I need a solution for both Android and iOS.
At Cordova's docs I can't find any alternative for this.
Any advice ?