@@ -3,6 +3,9 @@ enum AlarmAction { audio, display, email, procedure }
33
44/// Names for [AlarmAction] enum values
55class AlarmActionNames {
6+ /// Private constructor to prevent instantiation.
7+ AlarmActionNames ._();
8+
69 /// The name for the audio action.
710 static const audio = 'AUDIO' ;
811
@@ -32,7 +35,7 @@ class AlarmActionNames {
3235 }
3336}
3437
35- // Map between enum and names
38+ /// Extensions for [AlarmAction] enum.
3639extension AlarmActionExtensions on AlarmAction {
3740 /// Converts the enum value to its corresponding string name.
3841 String toName () => switch (this ) {
@@ -43,11 +46,14 @@ extension AlarmActionExtensions on AlarmAction {
4346 };
4447}
4548
46- /// Calendar user types.
49+ /// Calendar user types.
4750enum CalendarUserType { individual, group, resource, room, unknown }
4851
4952/// Names for [CalendarUserType] enum values
5053class CalendarUserTypeNames {
54+ /// The private constructor to prevent instantiation.
55+ CalendarUserTypeNames ._();
56+
5157 /// The name for the individual user type.
5258 static const individual = 'INDIVIDUAL' ;
5359
@@ -82,6 +88,7 @@ class CalendarUserTypeNames {
8288 }
8389}
8490
91+ /// Extensions for [CalendarUserType] enum.
8592extension CalendarUserTypeExtensions on CalendarUserType {
8693 /// Converts the enum value to its corresponding string name.
8794 String toName () => switch (this ) {
@@ -98,6 +105,9 @@ enum Classification { public, private, confidential }
98105
99106/// Names for [Classification] enum values
100107class ClassificationNames {
108+ /// The private constructor to prevent instantiation.
109+ ClassificationNames ._();
110+
101111 /// The name for the public classification.
102112 static const public = 'PUBLIC' ;
103113
@@ -122,6 +132,7 @@ class ClassificationNames {
122132 }
123133}
124134
135+ /// Extensions for [Classification] enum.
125136extension ClassificationExtensions on Classification {
126137 /// Converts the enum value to its corresponding string name.
127138 String toName () => switch (this ) {
@@ -136,6 +147,9 @@ enum EventStatus { tentative, confirmed, cancelled }
136147
137148/// Names for [EventStatus] enum values
138149class EventStatusNames {
150+ /// The private constructor to prevent instantiation.
151+ EventStatusNames ._();
152+
139153 /// The name for the tentative status.
140154 static const tentative = 'TENTATIVE' ;
141155
@@ -160,6 +174,7 @@ class EventStatusNames {
160174 }
161175}
162176
177+ /// Extensions for [EventStatus] enum.
163178extension EventStatusExtensions on EventStatus {
164179 /// Converts the enum value to its corresponding string name.
165180 String toName () => switch (this ) {
@@ -174,6 +189,9 @@ enum FreeBusyType { free, busy, busyUnavailable, busyTentative }
174189
175190/// Names for [FreeBusyType] enum values
176191class FreeBusyTypeNames {
192+ /// Private constructor to prevent instantiation.
193+ FreeBusyTypeNames ._();
194+
177195 /// The name for the free type.
178196 static const free = 'FREE' ;
179197
@@ -203,6 +221,7 @@ class FreeBusyTypeNames {
203221 }
204222}
205223
224+ /// Extensions for [FreeBusyType] enum.
206225extension FreeBusyTypeExtensions on FreeBusyType {
207226 /// Converts the enum value to its corresponding string name.
208227 String toName () => switch (this ) {
@@ -218,6 +237,9 @@ enum JournalStatus { draft, final_, amended }
218237
219238/// Names for [JournalStatus] enum values
220239class JournalStatusNames {
240+ /// The private constructor to prevent instantiation.
241+ JournalStatusNames ._();
242+
221243 /// The name for the draft status.
222244 static const draft = 'DRAFT' ;
223245
@@ -242,6 +264,7 @@ class JournalStatusNames {
242264 }
243265}
244266
267+ /// Extensions for [JournalStatus] enum.
245268extension JournalStatusExtensions on JournalStatus {
246269 /// Converts the enum value to its corresponding string name.
247270 String toName () => switch (this ) {
@@ -263,8 +286,10 @@ enum ParticipationStatus {
263286}
264287
265288/// Names for [ParticipationStatus] enum values
266-
267289class ParticipationStatusNames {
290+ /// The private constructor to prevent instantiation.
291+ ParticipationStatusNames ._();
292+
268293 /// The name for the needs-action status.
269294 static const needsAction = 'NEEDS-ACTION' ;
270295
@@ -309,6 +334,7 @@ class ParticipationStatusNames {
309334 }
310335}
311336
337+ /// Extensions for [ParticipationStatus] enum.
312338extension ParticipationStatusExtensions on ParticipationStatus {
313339 /// Converts the enum value to its corresponding string name.
314340 String toName () => switch (this ) {
@@ -327,6 +353,9 @@ enum ParticipationRole { chair, reqParticipant, optParticipant, nonParticipant }
327353
328354/// Names for [ParticipationRole] enum values
329355class ParticipationRoleNames {
356+ /// The private constructor to prevent instantiation.
357+ ParticipationRoleNames ._();
358+
330359 /// The name for the chair role.
331360 static const chair = 'CHAIR' ;
332361
@@ -356,6 +385,7 @@ class ParticipationRoleNames {
356385 }
357386}
358387
388+ /// Extensions for [ParticipationRole] enum.
359389extension ParticipationRoleExtensions on ParticipationRole {
360390 /// Converts the enum value to its corresponding string name.
361391 String toName () => switch (this ) {
@@ -378,8 +408,10 @@ enum RecurrenceFrequency {
378408}
379409
380410/// Names for [RecurrenceFrequency] enum values
381-
382411class RecurrenceFrequencyNames {
412+ /// The private constructor to prevent instantiation.
413+ RecurrenceFrequencyNames ._();
414+
383415 /// The name for the secondly frequency.
384416 static const secondly = 'SECONDLY' ;
385417
@@ -424,6 +456,7 @@ class RecurrenceFrequencyNames {
424456 }
425457}
426458
459+ /// Extensions for [RecurrenceFrequency] enum.
427460extension RecurrenceFrequencyExtensions on RecurrenceFrequency {
428461 /// Converts the enum value to its corresponding string name.
429462 String toName () => switch (this ) {
@@ -440,7 +473,11 @@ extension RecurrenceFrequencyExtensions on RecurrenceFrequency {
440473/// Relationship types.
441474enum RelationshipType { child, parent, sibling }
442475
476+ /// Names for [RelationshipType] enum values
443477class RelationshipTypeNames {
478+ /// The private constructor to prevent instantiation.
479+ RelationshipTypeNames ._();
480+
444481 /// The name for the child relationship type.
445482 static const child = 'CHILD' ;
446483
@@ -465,6 +502,7 @@ class RelationshipTypeNames {
465502 }
466503}
467504
505+ /// Extensions for [RelationshipType] enum.
468506extension RelationshipTypeExtensions on RelationshipType {
469507 /// Converts the enum value to its corresponding string name.
470508 String toName () => switch (this ) {
@@ -477,7 +515,11 @@ extension RelationshipTypeExtensions on RelationshipType {
477515/// Time transparency types.
478516enum TimeTransparency { opaque, transparent }
479517
518+ /// Names for [TimeTransparency] enum values
480519class TimeTransparencyNames {
520+ /// The private constructor to prevent instantiation.
521+ TimeTransparencyNames ._();
522+
481523 /// The name for the opaque transparency.
482524 static const opaque = 'OPAQUE' ;
483525
@@ -497,6 +539,7 @@ class TimeTransparencyNames {
497539 }
498540}
499541
542+ /// Extensions for [TimeTransparency] enum.
500543extension TimeTransparencyExtensions on TimeTransparency {
501544 /// Converts the enum value to its corresponding string name.
502545 String toName () => switch (this ) {
@@ -510,6 +553,9 @@ enum TodoStatus { needsAction, completed, inProcess, cancelled }
510553
511554/// Names for [TodoStatus] enum values
512555class TodoStatusNames {
556+ /// The private constructor to prevent instantiation.
557+ TodoStatusNames ._();
558+
513559 /// The name for the needs-action status.
514560 static const needsAction = 'NEEDS-ACTION' ;
515561
@@ -539,6 +585,7 @@ class TodoStatusNames {
539585 }
540586}
541587
588+ /// Extensions for [TodoStatus] enum.
542589extension TodoStatusExtensions on TodoStatus {
543590 /// Converts the enum value to its corresponding string name.
544591 String toName () => switch (this ) {
@@ -569,6 +616,9 @@ enum ValueType {
569616
570617/// Names for [ValueType] enum values
571618class ValueTypeNames {
619+ /// The private constructor to prevent instantiation.
620+ ValueTypeNames ._();
621+
572622 /// The name for the binary value type.
573623 static const binary = 'BINARY' ;
574624
@@ -648,6 +698,7 @@ class ValueTypeNames {
648698 }
649699}
650700
701+ /// Extensions for [ValueType] enum.
651702extension ValueTypeExtensions on ValueType {
652703 /// Converts the enum value to its corresponding string name.
653704 String toName () => switch (this ) {
@@ -673,6 +724,9 @@ enum Weekday { su, mo, tu, we, th, fr, sa }
673724
674725/// Names for [Weekday] enum values
675726class WeekdayNames {
727+ /// The private constructor to prevent instantiation.
728+ WeekdayNames ._();
729+
676730 /// The name for Sunday.
677731 static const su = 'SU' ;
678732
@@ -717,6 +771,7 @@ class WeekdayNames {
717771 }
718772}
719773
774+ /// Extensions for [Weekday] enum.
720775extension WeekdayExtensions on Weekday {
721776 /// Converts the enum value to its corresponding string name.
722777 String toName () => switch (this ) {
0 commit comments