If you use a private, named ctor:

    ResourceEventType._(this.name)

then people outside of the library won't be able to instantiate one. Useful for things which are essentially enums.