2 / 2
May 2024

Hello guys,

I have been getting error “Instance of …” while trying to print out the return of:

NB: I’m using Atlas Device Sync and I have successfully written to the database.
But to get them out I did:

getAllItems() { try { final getIt = realm.all<CustomerData>(); CustomerData data = getIt[0]; print(" here is it ${data}"); return data; } on RealmException catch (e) { print(e); } }

I called getAllItems with a provider, as in:

verifyStart(context) async { final getAll = await Provider.of<CustomerNotifier>(context, listen: false) .getAllItems(); print(getAll); }

All I kept getting was INSTANCE OF CUSTOMER DATA, but I need the real data.

Thanks in advance.