HeartBPMDialog constructor
HeartBPMDialog({
- Key? key,
- required BuildContext context,
- int sampleDelay = 2000 ~/ 30,
- required void onBPM(),
- void onRawData()?,
- double alpha = 0.8,
- Widget? child,
Obtains heart beats per minute using camera sensor
Using the smartphone camera, the widget estimates the skin tone variations over time. These variations are due to the blood flow in the arteries present below the skin of the fingertips.
This is a Dialog widget and hence needs to be displayer using showDialog function. For example:
await showDialog(
context: context,
builder: (context) => HeartBPMDialog(
onData: (value) => print(value),
),
);
Implementation
HeartBPMDialog({
Key? key,
required this.context,
this.sampleDelay = 2000 ~/ 30,
required this.onBPM,
this.onRawData,
this.alpha = 0.8,
this.child,
});