onAnimatedButtonLongPress method
void
onAnimatedButtonLongPress()
animated button on LongPress
Implementation
void onAnimatedButtonLongPress() async {
// HapticFeedback.heavyImpact();
final permissionStatus = await micPermission.request();
if (permissionStatus.isGranted) {
if (!isText) {
_stopWatchTimer.onStartTimer();
_stopWatchTimer.rawTime.listen((value) {
_recordTime = value;
print('rawTime $value ${StopWatchTimer.getDisplayTime(_recordTime)}');
notifyListeners();
});
textController.clear();
recordAudio();
_isRecording = true;
notifyListeners();
}
}
if (permissionStatus.isPermanentlyDenied) {
openAppSettings();
}
}