generateDate method
Generate date string for the request.
Format: yyyy-MM-DD
.
Example: 2019-02-25
.
Implementation
String generateDate(DateTime date) {
final utc = date.isUtc ? date : date.toUtc();
return '${utc.year}-${utc.month.toString().padLeft(2, '0')}-${utc.day.toString().padLeft(2, '0')}';
}