getConnectionType method
Implementation
Future<ConnectionType> getConnectionType() async {
final int connection = await _channel.invokeMethod('getConnectionType');
//print('Connection: ${connection.toString()}');
return connection == 0
? ConnectionType.WIFI
: connection == 1
? ConnectionType.MOBILE
: ConnectionType.NOT_CONNECTED;
}