fABPressed method
fABPressed is called when the Flutster floating button is pressed.
Implementation
void fABPressed(void Function(VoidCallback fn) updateParent) {
DateTime now = DateTime.now();
if (now.difference(latestFABPressed) > doublePressDelay) {
latestFABPressed = now;
Future.delayed(doublePressDelay).whenComplete(() {
if (latestFABPressed == now) {
openFlutsterTestMenu(updateParent);
}
});
} else {
latestFABPressed = now;
if (widget.flutsterTestRecord.recording) {
takeScreenShot(updateParent);
}
}
}