Relative Content

Tag Archive for androidiosflutterdart

how does the DateTime.now().microsecondsSinceEpoch exactly work in dart

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 […]

Flutter: How to get app latest version number from Google Play Store

I am working on a project that require me to compare the app version. I am currently using package_info_plus to get the current app version, but I still can’t manage to get the latest version from the Play Store. Is there anyway to allow me to read the latest version number from the Play Store using my App ID?

initState vs didChangeDependencies in using context

as I was studying the lifecycle of a stateful widget I found that we can not use the context in the initState because the context is not totally inserted to the widget tree,
however when I use the BlocProvider.of(context) it works with me and I don’t know why here is the full code :