新增本地文件
This commit is contained in:
parent
7cc7e834b1
commit
73e8211165
BIN
star_lock/assets/ring1.mp3
Executable file
BIN
star_lock/assets/ring1.mp3
Executable file
Binary file not shown.
@ -1,4 +1,5 @@
|
||||
import 'package:aliyun_push/aliyun_push.dart';
|
||||
// import 'package:audioplayers/audioplayers.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
@ -142,7 +143,7 @@ class _MyAppState extends State<MyApp> with WidgetsBindingObserver, BaseWidget {
|
||||
XSAliyunPushProvider()
|
||||
.pushBindDeviceID(deviceId, Platform.isAndroid ? 10 : 20);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// //使用userid根据账号推送
|
||||
@ -182,3 +183,18 @@ Future _setCommonServices() async {
|
||||
await Get.putAsync(() => DeviceInfoService().init());
|
||||
// Get.log(PlatformInfoService.to.info.version);
|
||||
}
|
||||
|
||||
//播放本地音频
|
||||
// void playAudio() async {
|
||||
// const String audioPath = "assets/ring1.mp3";
|
||||
// AudioPlayer audioPlayer = AudioPlayer();
|
||||
// // int result = await audioPlayer.play(audioPath, isLocal: true);
|
||||
|
||||
// if (result == 1) {
|
||||
// // 播放成功
|
||||
// print("Audio playback successful!");
|
||||
// } else {
|
||||
// // 播放失败
|
||||
// print("Error playing audio");
|
||||
// }
|
||||
// }
|
||||
|
||||
0
star_lock/lib/talk/playAudio.dart
Normal file
0
star_lock/lib/talk/playAudio.dart
Normal file
Loading…
x
Reference in New Issue
Block a user