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.
You can use UniqueKey().hashCode()
to get a unique int.
For example:
final notificationId = UniqueKey().hashCode()
// or you can use DateTime.now().millisecondsSinceEpoch
...