1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] When accessing the ID variable in isar database it returns the same variable in all...

Discussão em 'Mobile' iniciado por Stack, Outubro 13, 2024 às 07:02.

  1. Stack

    Stack Membro Participativo

    I have a model called TransactionModel:

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


    When I 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.

    Continue reading...

Compartilhe esta Página