API Reference 0.3.24dart_web_toolkit_rolePressedValue<int>

PressedValue<int> class

State enum for 'aria-pressed' values.

class PressedValue<int> extends Enum<int> implements AriaAttributeType {

 //, FALSE, MIXED, UNDEFINED;
 static const PressedValue TRUE = const PressedValue(0);
 static const PressedValue FALSE = const PressedValue(1);
 static const PressedValue MIXED = const PressedValue(2);
 static const PressedValue UNDEFINED = const PressedValue(3);

 const PressedValue(int type) : super (type);

 /**
  * Gets the enum constant corresponding to {@code value} for the token type
  * PressedValue.
  *
  * @param value Boolean value for which we want to get the corresponding enum constant.
  */
 static PressedValue of(bool value) {
   return value ? TRUE : FALSE;
 }

 String getAriaValue() {
   switch (this) {
       case TRUE:
         return "true";
       case FALSE:
         return "false";
       case MIXED:
         return "mixed";
       case UNDEFINED:
         return "undefined";
   }
   return null; // not reachable
 }
}

Extends

Enum<int> > PressedValue<int>

Implements

AriaAttributeType

Static Properties

const PressedValue FALSE #

static const PressedValue FALSE = const PressedValue(1)

const PressedValue MIXED #

static const PressedValue MIXED = const PressedValue(2)

const PressedValue TRUE #

static const PressedValue TRUE = const PressedValue(0)

const PressedValue UNDEFINED #

static const PressedValue UNDEFINED = const PressedValue(3)

Static Methods

PressedValue of(bool value) #

Gets the enum constant corresponding to {@code value} for the token type PressedValue.

@param value Boolean value for which we want to get the corresponding enum constant.

static PressedValue of(bool value) {
 return value ? TRUE : FALSE;
}

Constructors

const PressedValue(int type) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
const PressedValue(int type) : super (type);

Properties

final T value #

inherited from Enum
T get value => _value;

Methods

String getAriaValue() #

String getAriaValue() {
 switch (this) {
     case TRUE:
       return "true";
     case FALSE:
       return "false";
     case MIXED:
       return "mixed";
     case UNDEFINED:
       return "undefined";
 }
 return null; // not reachable
}