stopRecordingButton method
Widget
stopRecordingButton(
- BuildContext context,
- StateSetter setState,
- void updateParent(
- VoidCallback fn
stopRecordingButton builds a button to stop the recording.
Implementation
Widget stopRecordingButton(BuildContext context, StateSetter setState,
void Function(VoidCallback fn) updateParent) {
return (IconButton(
padding: const EdgeInsets.all(0.0),
// icon:const Icon(Icons.fiber_manual_record),
icon: const Icon(
Icons.circle,
),
color: Colors.red,
onPressed: () {
if (!widget.flutsterTestRecord.recording) {
return;
}
updateParent(() {
widget.flutsterTestRecord.recording = false;
});
setState(() {});
snack(const Text("Recording stopped"), context);
},
tooltip: "Stop recording",
));
}