From cafe4c859c3418ebc509ee8a4ada47556f8b1239 Mon Sep 17 00:00:00 2001 From: MjKey Date: Wed, 11 Sep 2024 14:29:27 +0300 Subject: [PATCH] Update main.dart --- lib/main.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 9f58a44..bd03661 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -235,14 +235,13 @@ class _MainScreenState extends State { String _socketUrl = 'https://socket5.donationalerts.ru'; SocketService? _socketService; String _localIpAddress = ''; - final AudioPlayer _audioPlayer = AudioPlayer(); + final AudioPlayer = AudioPlayer(); int _httpPort = 8080; int _wsPort = 4040; List _processedDonations = []; List _soundFiles = []; // Файлы bool _isSoundNotificationEnabled = false; bool _isRandomSoundEnabled = false; - AudioPlayer _audioPlayer = AudioPlayer(); final String changelog = ''' ☆ Фикс [issues/3] @@ -275,7 +274,7 @@ class _MainScreenState extends State { void _incrementCounter() { setState(() { - _audioPlayer.play(AssetSource('pepe.mp3')); + .play(AssetSource('pepe.mp3')); _showAuthorInfo(); }); } @@ -1576,7 +1575,7 @@ class _MainScreenState extends State { final file = _isRandomSoundEnabled ? (_soundFiles..shuffle()).first : _soundFiles.first; - _audioPlayer.play(file.path, isLocal: true); + .play(file.path, isLocal: true); LogManager.log(Level.INFO, 'Воспроизведение звука: ${file.path}'); } }