ESenseButton.fromButtonEventChanged constructor

ESenseButton.fromButtonEventChanged(
  1. String deviceName,
  2. ButtonEventChanged event
)

Creates an ESenseButton from an esense_flutter ButtonEventChanged.

Note that deviceName is ignored and the device name is set to an empty string.

Implementation

factory ESenseButton.fromButtonEventChanged(String deviceName, ButtonEventChanged event) =>
    ESenseButton(deviceName: '', pressed: event.pressed);