emulateTimezone method

Future<void> emulateTimezone(
  1. String timezoneId
)

Implementation

Future<void> emulateTimezone(String timezoneId) async {
  try {
    await devTools.emulation.setTimezoneOverride(timezoneId);
  } catch (exception) {
    if ('$exception'.contains('Invalid timezone')) {
      throw Exception('Invalid timezone ID: $timezoneId');
    }
    rethrow;
  }
}