i have the following
Dateime.now() + here i need to increase only 1 microsecond
so wanted output is Dateime.now() + that incensement which is 1 microsecond
i tried the following but it does not work
print(DateTime.now()+const Duration(microsecond : 1);)
How can i implement this
>Solution :
This well get it done.
final now = DateTime.now();
final later = now.add(const Duration(millisecond: 1));
check docs here
Or do it in a single line:
DateTime now = DateTime.now().add(Duration(milliseconds: 1));
print(now);