flutter: windows: Do not init audio player
This commit is contained in:
parent
2d6a23573a
commit
fbdbd2b7f2
|
@ -29,7 +29,6 @@ import 'package:sanmill/services/audios.dart';
|
|||
import 'package:sanmill/style/app_theme.dart';
|
||||
import 'package:sanmill/widgets/navigation_home_screen.dart';
|
||||
|
||||
//import 'common/config.dart';
|
||||
import 'services/audios.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
|
@ -108,8 +107,13 @@ class _SanmillAppState extends State<SanmillApp> {
|
|||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
if (Platform.isWindows) {
|
||||
print("audio players is not support Windows.");
|
||||
return;
|
||||
} else {
|
||||
Audios.loadSounds();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
|
|
@ -90,8 +90,7 @@ class Audios {
|
|||
}
|
||||
|
||||
if (Platform.isWindows) {
|
||||
print(
|
||||
"audio players is not support Windows. See: https://pub.dev/packages/just_audio");
|
||||
print("audio players is not support Windows.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue