generateTrackId static method

String generateTrackId()

Generates a unique trackId based on the current timestamp and a random alphanumeric string.

Implementation

static String generateTrackId() {
  final timestamp = DateTime.now()
      .millisecondsSinceEpoch; // Current timestamp in milliseconds
  return "$timestamp${randomAlphaNumericString(7)}";
}