Merge pull request #10 from Iconica-Development/fix/recording-start-without-permissions

fix:recording start without permissions
This commit is contained in:
Gorter-dev 2023-03-27 10:11:36 +02:00 committed by GitHub
commit bd3e5a82ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 9 deletions

View file

@ -1,3 +1,7 @@
## 0.3.4
- Fixed audio recording that would start without permissions
## 0.3.3 ## 0.3.3
- Added optional left button on audio picker - Added optional left button on audio picker

View file

@ -146,7 +146,7 @@ packages:
path: ".." path: ".."
relative: true relative: true
source: path source: path
version: "0.3.3" version: "0.3.4"
flutter_plugin_android_lifecycle: flutter_plugin_android_lifecycle:
dependency: transitive dependency: transitive
description: description:

View file

@ -278,7 +278,7 @@ class _RecorderState extends ConsumerState<Recorder> {
); );
} }
playOnTap() { playOnTap() async {
if (recording) { if (recording) {
widget.audioService.recordStop(); widget.audioService.recordStop();
@ -288,13 +288,15 @@ class _RecorderState extends ConsumerState<Recorder> {
recording = false; recording = false;
}); });
} else { } else {
widget.audioService.recordStart(); try {
await widget.audioService.recordStart();
clock.startClock();
clock.startClock(); setState(() {
recording = true;
setState(() { });
recording = true; // ignore: empty_catches
}); } catch (e) {}
} }
} }

View file

@ -1,6 +1,6 @@
name: flutter_media_picker name: flutter_media_picker
description: A new Flutter package project. description: A new Flutter package project.
version: 0.3.3 version: 0.3.4
homepage: https://github.com/Iconica-Development/flutter_media_picker homepage: https://github.com/Iconica-Development/flutter_media_picker
publish_to: "none" publish_to: "none"