Unexpected results if using microseconds in web #44717
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-core
type-documentation
A request to add or improve documentation
Both print statements in this sample code output the same value:
I noticed this while trying my Flutter app in web, because it caused an infinite loop (works fine in mobile). My app is using microseconds extensively for different
DateTime
calculations, so it seems I have to do a lot of refactoring to make my app compatible with web.This limitation is indirectly documented here: https://api.dart.dev/stable/2.10.4/dart-core/DateTime/microsecondsSinceEpoch.html
I think this should be documented more clearly at least in
DateTime.add
and inDuration
. Also an analyzer warning would be good.It is also unclear is it safe to use getter
Duration.inMicroseconds
in web.The text was updated successfully, but these errors were encountered: