DesignRole enum

Defines the architectural role of a component within a system.

This enum helps categorize classes based on their responsibilities, making it easier to organize and reason about the system design.

Example

void assignRole(DesignRole role) {
  if (role == DesignRole.APPLICATION) {
    print("This is core application logic.");
  } else if (role == DesignRole.SUPPORT) {
    print("This is a supporting component.");
  } else if (role == DesignRole.INFRASTRUCTURE) {
    print("This provides infrastructure support.");
  }
}
Inheritance
Available extensions

Values

APPLICATION → const DesignRole

Represents the core application logic layer.

const DesignRole(0)
SUPPORT → const DesignRole

Represents supportive components, such as utilities or helpers.

const DesignRole(1)
INFRASTRUCTURE → const DesignRole

Represents infrastructure-level components, such as persistence or networking.

const DesignRole(2)

Properties

hashCode → int
The hash code for this object.
no setterinherited
index → int
A numeric identifier for the enumerated value.
no setterinherited
name → String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value → int
Numeric representation of the role for easier serialization or mapping.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

fromValue(int value) → DesignRole
Returns the DesignRole that corresponds to the given integer value.
valueOf(String name) → DesignRole
Returns the DesignRole that matches the given name.

Constants

values → const List<DesignRole>
A constant List of the values in this enum, in order of their declaration.