fix: Animation of recording dialog

This commit is contained in:
Christian Pauly 2021-05-01 16:43:43 +02:00
parent 918731b8d6
commit 4510c259e1

View File

@ -67,7 +67,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
} }
const maxDecibalWidth = 64.0; const maxDecibalWidth = 64.0;
final decibalWidth = final decibalWidth =
((_duration.inSeconds % 2) + 1) * (maxDecibalWidth / 2).toDouble(); ((_duration.inSeconds % 2) + 1) * (maxDecibalWidth / 4).toDouble();
final time = final time =
'${_duration.inMinutes.toString().padLeft(2, '0')}:${(_duration.inSeconds % 60).toString().padLeft(2, '0')}'; '${_duration.inMinutes.toString().padLeft(2, '0')}:${(_duration.inSeconds % 60).toString().padLeft(2, '0')}';
@ -79,7 +79,7 @@ class _RecordingDialogState extends State<RecordingDialog> {
height: maxDecibalWidth, height: maxDecibalWidth,
alignment: Alignment.center, alignment: Alignment.center,
child: AnimatedContainer( child: AnimatedContainer(
duration: Duration(milliseconds: 50), duration: Duration(seconds: 1),
width: decibalWidth, width: decibalWidth,
height: decibalWidth, height: decibalWidth,
decoration: BoxDecoration( decoration: BoxDecoration(