feat: Nicer audio message design and send duration

This commit is contained in:
Krille Fear 2021-10-27 16:53:31 +02:00
commit b01d81ee30
3 changed files with 77 additions and 60 deletions

View file

@ -133,8 +133,10 @@ class _RecordingDialogState extends State<RecordingDialog> {
onPressed: () async {
_recorderSubscription?.cancel();
await _audioRecorder.stop();
Navigator.of(context, rootNavigator: false)
.pop<String>(_recordedPath);
Navigator.of(context, rootNavigator: false).pop<Map>({
'path': _recordedPath,
'duration': _duration.inMilliseconds,
});
},
child: Text(L10n.of(context).send.toUpperCase()),
),