fromMicrosecondsSinceEpoch method

DateTime? fromMicrosecondsSinceEpoch({
  1. bool isUtc = false,
})

DateTime from microseconds

Implementation

DateTime? fromMicrosecondsSinceEpoch({bool isUtc = false}) {
  num n = this;
  if (n is! int) n = n.toInt();
  if (n.toString().length != 16) return null;
  return DateTime.fromMicrosecondsSinceEpoch(n, isUtc: isUtc);
}