when accessing the ID variable in isar Database it returns the same variable in all the data in the list

27 views Asked by At

I have a model called TransactionModel:

class TransactionModel {
  final Id keyID = Isar.autoIncrement;
  final DateTime dateTransaction;
  final String concept;
  final double ammountDouble;
}

when use:

print(data.keyID.toString());

-9223372036854775808

but I can have more data and this always comes back;

Also, if I want to use it as an identifier for isaar's get or delete functions, it doesn't work.

in the Isar inspector if it works correctly, it shows me the data well

I hope to understand why this happens, if it is a complementary number, and how to transform it, to know why it is the same or if I am simply accessing the variable wrong.

0

There are 0 answers