title: Uncaught Uncaught Error: Unsupported operation: Socket constructor in dart with postgresql
body: <p>I am trying to connect dart with database(optional like postgrelsql,mongodb). I installed postgresql and created db,table and goto pubspec.yaml then add depencies postgresql and run pub get.
      then i mentioned the library file </p>
  
  <pre><code>import 'package:postgresql/postgresql.dart';
  </code></pre>
  
  <p>connection details</p>
  
  <pre><code>  var uri = 'postgres://postgres:root@localhost:5432/testdb';
     connect(uri).then((conn) {  
     }); 
  </code></pre>
  
  <p>but I got following error which I cant understand clearly. pls help me.</p>
  
  <pre><code>Stack Trace:
  
  Uncaught Uncaught Error: Unsupported operation: Socket constructor
  </code></pre>
  
  <p>Stack Trace:
  Unsupported operation: Socket constructor
      at dart.wrapException (<a href="http://localhost:8080/dbconnection.dart.js:2531:15" rel="nofollow">http://localhost:8080/dbconnection.dart.js:2531:15</a>)
      at null.Socket_connect (<a href="http://localhost:8080/dbconnection.dart.js:11612:13" rel="nofollow">http://localhost:8080/dbconnection.dart.js:11612:13</a>)
      at dart.Socket_connect [as call$2] (<a href="http://localhost:8080/dbconnection.dart.js:11614:14" rel="nofollow">http://localhost:8080/dbconnection.dart.js:11614:14</a>)
      at ConnectionImpl_connect_closure.dart.ConnectionImpl_connect_closure.call$0 (<a href="http://localhost:8080/dbconnection.dart.js:13515:28" rel="nofollow">http://localhost:8080/dbconnection.dart.js:13515:28</a>)
      at dart.Future_Future$sync (<a href="http://localhost:8080/dbconnection.dart.js:4723:28" rel="nofollow">http://localhost:8080/dbconnection.dart.js:4723:28</a>)
      at dart.ConnectionImpl.static.ConnectionImpl_connect (<a href="http://localhost:8080/dbconnection.dart.js:13468:18" rel="nofollow">http://localhost:8080/dbconnection.dart.js:13468:18</a>)
      at dart.connect (<a href="http://localhost:8080/dbconnection.dart.js:12861:14" rel="nofollow">http://localhost:8080/dbconnection.dart.js:12861:14</a>)
      at dart.PostgrelSqlconn (<a href="http://localhost:8080/dbconnection.dart.js:12836:7" rel="nofollow">http://localhost:8080/dbconnection.dart.js:12836:7</a>)
      at main (<a href="http://localhost:8080/dbconnection.dart.js:12825:15" rel="nofollow">http://localhost:8080/dbconnection.dart.js:12825:15</a>)
      at _wrapJsFunctionForAsync_closure.dart._wrapJsFunctionForAsync [as _captured_protected_1] (<a href="http://localhost:8080/dbconnection.dart.js:2923:11" rel="nofollow">http://localhost:8080/dbconnection.dart.js:2923:11</a>) (<a href="http://localhost:8080/dbconnection.dart.js:2531" rel="nofollow">http://localhost:8080/dbconnection.dart.js:2531</a>)</p>