errorToString static method
Implementation
static String errorToString(Object o, [StackTrace? stackTrace]) {
String errStr;
if (o is Error) {
errStr = 'AudioPlayers Error: $o\n${o.stackTrace}';
} else if (o is Exception) {
errStr = 'AudioPlayers Exception: $o';
} else {
errStr = 'AudioPlayers throw: $o';
}
if (stackTrace != null && stackTrace.toString().isNotEmpty) {
errStr += '\n$stackTrace';
}
return errStr;
}