I'm making a mySql connection with dard but I aways getting this error: Unhandled exception: SocketException: Socket has been closed to this code below: `import 'dart:async'; import 'package:mysql1/mysql1.dart'; class Connect { Future conection() async { final conn = await MySqlConnection.connect(ConnectionSettings( host: '', port: 3306, user: '', db: '', password: '', useCompression: false, useSSL: false, timeout: const Duration(seconds: 20))); return conn; } } Does someone knows how to fix it? In this code I return conn because I use it in another class that finds my query, that I'm making in a dynamic way.