ユーザーがボタンをクリックするとタイマーが開始され、ユーザーが設定した時間後 just_audio: ^0.6.15+1
にフラッタープロジェクトで使用しているサウンドが再生されるプロジェクトを作成していますが、以下の多くの問題がエラーになります。
D/Linux (21303): [Posix_connect Debug]Process com.snss.xlnc :443
E/flutter (21303): [ERROR:flutter/lib/ui/ui_dart_state.cc(186)] Unhandled Exception: Connection aborted
E/flutter (21303): #0 AudioPlayer._load (package:just_audio/just_audio.dart:688:11)
E/flutter (21303): <asynchronous suspension>
E/flutter (21303): #1 AudioPlayer.load (package:just_audio/just_audio.dart:625:14)
E/flutter (21303): <asynchronous suspension>
E/flutter (21303): #2 AudioPlayer.setAudioSource (package:just_audio/just_audio.dart:602:18)
E/flutter (21303): <asynchronous suspension>
E/flutter (21303): #3 _ClassStartState.keepRunning (package:xlnc/tutor/startClass.dart:84:7)
E/flutter (21303): <asynchronous suspension>
E/flutter (21303):
これは私のコードです
var t = DateFormat.Hms().parse(time);
var rT = DateFormat.Hms().parse(remTime);
var co = t.isAfter(rT);
if (co) {
player.setUrl('$soundUrl');
player.setVolume(1);
player.play();
player.setLoopMode(LoopMode.one);
}
これは私のフラッタードクターです -v
[√] Flutter (Channel stable, 2.0.1, on Microsoft Windows [Version 10.0.19042.804], locale en-IN)
• Flutter version 2.0.1 at D:\flutter
• Framework revision c5a4b4029c (7 days ago), 2021-03-04 09:47:48 -0800
• Engine revision 40441def69
• Dart version 2.12.0
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at D:\android_sdk
• Platform android-S, build-tools 30.0.3
• ANDROID_HOME = D:\android_sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.54.1)
• VS Code at C:\Users\user\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.20.0
[√] Connected device (3 available)
• vivo 1907 (mobile) • SOFAE6TCEMRKFUCU • android-arm64 • Android 10 (API 29)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82
• Edge (web) • edge • web-javascript • Microsoft Edge 88.0.705.81
• No issues found!