getZoneOrNull abstract method

Future<DateTimeZone?> getZoneOrNull(
  1. String id
)

Returns the time zone for the given ID, if it's available.

Note that this may return a DateTimeZone that has a different ID to that requested, if the ID provided is an alias.

Note also that this method is not required to return the same DateTimeZone instance for successive requests for the same ID; however, all instances returned for a given ID must compare as equal.

The fixed-offset timezones with IDs 'UTC' and "UTC+/-Offset" are always available.

id: The time zone ID to find.

Implementation

Future<DateTimeZone?> getZoneOrNull(String id);