BloodType enum

Enumeration of blood type classifications.

Represents the different blood types as used in the Tawakkalna system. Each type is associated with a numeric code for API communication.

TODO:(TWK-team) Verify and document the actual blood types and their values (e.g., which code represents A+, B+, O-, etc.)

Example:

final bloodType = await twk.getUserBloodType();
if (bloodType != null) {
  print('Blood type code: ${bloodType.code}');
}
Inheritance
Available extensions

Values

type_0 → const BloodType

Blood type 0 (specific type to be documented)

const BloodType._(0)
type_1 → const BloodType

Blood type 1 (specific type to be documented)

const BloodType._(1)
type_2 → const BloodType

Blood type 2 (specific type to be documented)

const BloodType._(2)
type_3 → const BloodType

Blood type 3 (specific type to be documented)

const BloodType._(3)
type_4 → const BloodType

Blood type 4 (specific type to be documented)

const BloodType._(4)
type_5 → const BloodType

Blood type 5 (specific type to be documented)

const BloodType._(5)
type_6 → const BloodType

Blood type 6 (specific type to be documented)

const BloodType._(6)
type_7 → const BloodType

Blood type 7 (specific type to be documented)

const BloodType._(7)

Properties

code → int
The numeric code representing this blood type in the API
final
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

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

fromCode(int code) → BloodType?
Creates a BloodType from a numeric code.

Constants

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