fromValue static method

GamepadType fromValue(
  1. int value
)

Returns the appropriate GamepadType for the given C++ value.

Implementation

static GamepadType fromValue(int value) =>
    values.firstWhereOrNull((type) => type.index == value) ?? unknown;