mysql1_dart icon indicating copy to clipboard operation
mysql1_dart copied to clipboard

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: TimeoutException after 0:00:30.000000: Future not completed

Open naeemudheenp opened this issue 5 years ago • 0 comments

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: TimeoutException after 0:00:30.000000: Future not completed

` var db=null;

try{
  ConnectionSettings settings = new ConnectionSettings(
      host: '10.0.2.2',
      port: 80,
      user: 'root',
      password:'',
      db: 'master'
  );
  db =  MySqlConnection.connect(settings);
}
catch(e){
  print("Unable to connect."+e.toString());
}

try{
  var result = await db.query('insert into users (productBarcode, productName, productPrice,productQuantity) values (?, ?, ?)', [productBarcode.text,productName.text,productPrice.text,productQuantity.text]);
return(result);
}
 catch(e){
  print("Unable to upload data."+e.toString());
}

} }`

naeemudheenp avatar Dec 03 '20 06:12 naeemudheenp