toDateTime method

DateTime toDateTime({
  1. bool? isUtc,
})

Convert a Timestamp to a DateTime object. This conversion causes a loss of precision and support millisecond precision.

Implementation

DateTime toDateTime({bool? isUtc}) {
  return DateTime.fromMicrosecondsSinceEpoch(microsecondsSinceEpoch,
      isUtc: isUtc == true);
}