0
votes

I am making a todo app with notifications and am using flutter local notifications plugin, How do I generate a unique integer as id for a specific todo so that I can also cancel notification of that specific todo using that unique integer. and the value f the integer must be an int which and the first value must be 0 and then it increment by one . i used

    class data {
        final String name = "test" ;
        final notificationId = UniqueKey().hashCode;

     }

but it gives random values and in my case i need values starts from 0 and increment by 1 .How to do it ? is there any others packages