yyyyMMdd property

String get yyyyMMdd
var now = DateTime.now(); // 2024-02-07 15:19:21.944
now.yyyyMMdd; // 2024.02.07

Implementation

String get yyyyMMdd {
  return DateFormat('yyyy.MM.dd').format(this);
}