date function

String date()

Return a string containing the current day, month, and year, separated by dashes.

Returns: A string with the current date.

Implementation

String date() {
  final now = DateTime.now();
  return '${now.day}-${now.month}-${now.year}';
}