dateKey property

String get dateKey

Generates a unique image key based on the current date and time.

Example:

String imageKey = KeyGenerator.dateKey;
print(imageKey); // Output: Current date and time formatted as 'yyyyMMddHHmmss'.

Implementation

static String get dateKey {
  final a = DateTime.now();
  return "${a.year.x4D}${a.month.x2D}${a.day.x2D}${a.hour.x2D}${a.minute.x2D}${a.second.x2D}";
}