appFirstLaunchDate static method

Future<DateTime?> appFirstLaunchDate()

Days since first launch

Implementation

static Future<DateTime?> appFirstLaunchDate() async {
  return await useMonitoringMethod(() async {
    String? firstLaunch = await readValue("first_launch");
    if (firstLaunch == null || firstLaunch.isEmpty) {
      return null;
    }

    try {
      return DateTime.parse(firstLaunch);
    } on Exception catch (e) {
      NyLogger.error(e.toString());
      return null;
    }
  });
}