getSuffix static method

String getSuffix({
  1. required bool isUtc,
  2. bool showLocalIndicator = false,
})

Returns the appropriate timezone suffix based on UTC status and user preference

isUtc - Whether the time is in UTC showLocalIndicator - Whether to show 'L' indicator for local time

Returns:

  • ' z' for UTC time
  • ' ʟ' (small capital L) for local time when showLocalIndicator is true
  • '' (empty) for local time when showLocalIndicator is false

Implementation

static String getSuffix(
    {required bool isUtc, bool showLocalIndicator = false}) {
  if (isUtc) {
    return ' z';
  } else {
    // Using Unicode small capital L (U+029F) for a visually smaller indicator
    return showLocalIndicator ? ' ʟ' : '';
  }
}