toMap method

Map<String, dynamic> toMap()

Converts this eye state to a map for serialization.

Implementation

Map<String, dynamic> toMap() {
  return {
    'leftEyeOpen': leftEyeOpen,
    'rightEyeOpen': rightEyeOpen,
    'leftEyeBlink': leftEyeBlink,
    'rightEyeBlink': rightEyeBlink,
    'timestamp': timestamp.millisecondsSinceEpoch,
  };
}