I'm trying to create a context with dataModel and persistentStore... Follow the code below working with PostgreSQL:
@override
Future prepare() async {
logger.onRecord.listen((rec) => print("$rec ${rec.error ?? ""} ${rec.stackTrace ?? ""}"));
final dataModel = ManagedDataModel.fromCurrentMirrorSystem();
final persistentStore = PostgreSQLPersistentStore.fromConnectionInfo(
"heroes_user", "password", "localhost", 5432, "heroes");
context = ManagedContext(dataModel, persistentStore);
}
I want use MySQL instead PostgreSQL, I dont find any tutorial using it.