<code>for (int i = 0; i < 3; i++) {
final key = DateTime.now().microsecondsSinceEpoch;
newTickets["$phoneNumber#$key#$username#${i + 1}"] = result.isNotEmpty ?
"${selectedType}_${result[i]}"
: selectedType;
}
</code>
<code>for (int i = 0; i < 3; i++) {
final key = DateTime.now().microsecondsSinceEpoch;
newTickets["$phoneNumber#$key#$username#${i + 1}"] = result.isNotEmpty ?
"${selectedType}_${result[i]}"
: selectedType;
}
</code>
for (int i = 0; i < 3; i++) {
final key = DateTime.now().microsecondsSinceEpoch;
newTickets["$phoneNumber#$key#$username#${i + 1}"] = result.isNotEmpty ?
"${selectedType}_${result[i]}"
: selectedType;
}
I use the exact above code in two applications, however in the first app the key value is being different for each iteration unlike the second where all the 3 values of the key are exactly the same , I tried to write a loop which iterate 100 times and does nothing but printing the DateTime.now().microsecondsSinceEpoch the value changes but not in each iteration for each multiple iterations the DateTime.now().microsecondsSinceEpoch value change once , any ideas about why this is happening ?