Describe the bug
flutter: PlatformException(PLAY_ERROR, Cannot play assets/audio/001.mp3, The operation could not be completed, null)
[VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: PlatformException(PLAY_ERROR, Cannot play assets/audio/001.mp3, The operation could not be completed, null)
Small code to reproduce
import 'dart:convert';
import 'dart:io' show Platform;
import 'package:assets_audio_player/assets_audio_player.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:StressAbbauen/Config/Constants.dart';
import 'package:StressAbbauen/Models/Posts.dart';
import 'dart:async';
import 'package:StressAbbauen/Screens/Global_File/GlobalFile.dart';
import 'package:StressAbbauen/Services/audioPlayer.dart';
import 'package:http/http.dart' as http;
Flutter Version
My version : 2.10.4
Lib Version
My version : 3.0.4+1
Platform (Android / iOS / web) + version
Platform : iOS Deployment target 12.0
Describe the bug flutter: PlatformException(PLAY_ERROR, Cannot play assets/audio/001.mp3, The operation could not be completed, null) [VERBOSE-2:ui_dart_state.cc(209)] Unhandled Exception: PlatformException(PLAY_ERROR, Cannot play assets/audio/001.mp3, The operation could not be completed, null)
Small code to reproduce import 'dart:convert'; import 'dart:io' show Platform; import 'package:assets_audio_player/assets_audio_player.dart'; import 'package:firebase_auth/firebase_auth.dart'; import 'package:flutter/material.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:StressAbbauen/Config/Constants.dart'; import 'package:StressAbbauen/Models/Posts.dart';
import 'dart:async';
import 'package:StressAbbauen/Screens/Global_File/GlobalFile.dart'; import 'package:StressAbbauen/Services/audioPlayer.dart'; import 'package:http/http.dart' as http;
class SplashScreenPage extends StatefulWidget { @override _SplashScreenPageState createState() => _SplashScreenPageState(); }
class _SplashScreenPageState extends State {
final String imagename = 'assets/images/logo.svg';
Widget get svg => SvgPicture.asset(
imagename,
width: 50,
height: 50,
color: VtmBlue,
);
Future<List> getPosts() async {
//calling api
}
startTime() async { getPosts();
} void navigationPage() { Navigator.of(context).pushReplacementNamed('Bottombar'); }
void initState() { super.initState(); startTime(); }
@override Widget build(BuildContext context) { return Scaffold( body: Center( child: Column( children: [ Spacer(), Container( height: 200, width: 200, child: SvgPicture.asset( imagename, color: VtmBlue, )), SizedBox( height: 20, ), Text( splashTitle ?? "The Relief of Pain", style: TextStyle(color: VtmBlue, fontSize: 32), textAlign: TextAlign.center, ), Spacer(), Text( splashSubTitle ?? "VTM Dr. Stein", style: TextStyle(color: VtmBlue, fontSize: 28), ), SizedBox( height: 2, ), / Text("Dr.Stein",style: TextStyle( color: VtmBlue,fontWeight: FontWeight.bold, fontSize: 20 ),),/ Spacer(), ], ), ), ); } }