uploadLocalFile method
Implementation
Future<bool> uploadLocalFile(String filePath) async {
File file = File(filePath);
if (await file.exists()) {
CustomizeWatchFaceBean bean = CustomizeWatchFaceBean(file: filePath, index: 5);
/// 调用表盘上传接口
try {
// print("开始上传");
await sendWatchFace(SendWatchFaceBean(watchFaceFlutterBean: bean, timeout: 30));
return true;
} catch (e) {
// print(e);
// print("上传超时");
return false;
}
} else {
// print("没有这个文件");
return false;
}
}