Attempting to hook up with a Static IP DB. However whereas initializing im getting this error
Error:
flutter: Connection failed: MissingPluginException(No implementation discovered for methodology connectDB on channel plugin.sqlconn.sql_conn/sql_conn)
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation discovered for methodology disconnectDB on channel plugin.sqlconn.sql_conn/sql_conn)
Please be aware I’ve already tried flutter clear and compelled flutter packages get
The entire code is as under for testing connection
import 'bundle:flutter/materials.dart';
import 'bundle:sql_conn/sql_conn.dart';
void most important() {
WidgetsFlutterBinding.ensureInitialized();
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@OverRide
Widget construct(BuildContext context) {
return MaterialApp(
title: "Take a look at",
residence: TestPage(),
);
}
}
class TestPage extends StatelessWidget {
@OverRide
Widget construct(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Textual content('Plugin instance app'),
),
physique: Heart(
little one: ElevatedButton(
onPressed: () async {
await join(context);
},
little one: Textual content("Join"),
),
),
);
}
Future join(BuildContext ctx) async {
strive {
await SqlConn.join(
ip: "ip_add",
port: "1443",
databaseName: "TEST",
username: "u_id",
password: "pwd",
);
print("Linked!");
} catch (e) {
print("Connection failed: $e");
} lastly {
SqlConn.disconnect();
}
}
}