GpsTime.fromUtc constructor

GpsTime.fromUtc(
  1. int year, {
  2. int month = 1,
  3. int day = 1,
  4. int hour = 0,
  5. int minute = 0,
  6. int second = 0,
  7. bool autoClamp = false,
})

Factory constructor from a UTC date specified by year and optionally month, day, hour, minute and second.

For autoClamp parameter see the standard GpsTime constructor.

Implementation

factory GpsTime.fromUtc(
  int year, {
  int month = 1,
  int day = 1,
  int hour = 0,
  int minute = 0,
  int second = 0,
  bool autoClamp = false,
}) {
  final dateTime = DateTime.utc(year, month, day, hour, minute, second);
  return GpsTime.fromDateTime(dateTime, autoClamp: autoClamp);
}