updateTimeZone method
void
updateTimeZone(
- int index
)
Implementation
void updateTimeZone(int index) {
TimeZone timeZone = timeZones[index];
timeZoneString.value = timeZone.formatTimeZoneName();
timeZones[_currentTimeZoneIndex].isSelected = false;
timeZone.isSelected = true;
double offsetDifference =
timeZone.offset - timeZones[_currentTimeZoneIndex].offset;
_startTime = _startTime.add(Duration(
hours: offsetDifference.toInt(),
minutes: ((offsetDifference - offsetDifference.toInt()) * 60).toInt()));
startTimeString.value = _startTime.format;
_currentTimeZoneIndex = index;
Get.back();
}