nowToIsoString static method

Future<String> nowToIsoString({
  1. bool isUtc = true,
})

Returns the current accurate time as an ISO 8601 string.

isUtc defaults to true (UTC).

Implementation

static Future<String> nowToIsoString({bool isUtc = true}) =>
    now(isUtc: isUtc).then((time) => time.toIso8601String());