GamepadEvent.parse constructor
GamepadEvent.parse(
- Map map
Implementation
factory GamepadEvent.parse(Map<dynamic, dynamic> map) {
final gamepadId = map['gamepadId'] as String;
final timestamp = map['time'] as int;
final type = KeyType.values.byName(map['type'] as String);
final key = map['key'] as String;
final value = map['value'] as double;
return GamepadEvent(
gamepadId: gamepadId,
timestamp: timestamp,
type: type,
key: key,
value: value,
);
}