SolarTimeUtil constructor

SolarTimeUtil({
  1. double longitude = 120.0,
  2. double latitude = 35.0,
})

构造函数

Implementation

SolarTimeUtil({double longitude = 120.0, double latitude = 35.0})
  : lng = longitude,
    lat = latitude {
  if (lng < -180.0 || lng > 180.0) {
    throw Exception('illegal longitude: $lng');
  }
  if (lat < -90.0 || lat > 90.0) {
    throw Exception('illegal latitude: $lat');
  }
}