publicTypeName function

String? publicTypeName(
  1. String? format
)

The type name of a user-defined type in the public schema (public.mood[] → mood), or null for any other format.

Implementation

String? publicTypeName(String? format) {
  if (format == null || !format.startsWith('public.')) return null;
  return format
      .substring('public.'.length)
      .replaceAll('[]', '')
      .replaceAll('"', '');
}