initialize static method
Implementation
static Future initialize() async {
// String skinJson = await AgoraSharedUtils.getString(AgoraSharedConstant.fcSkinShare);
// if (skinJson.length == 0) {
currentSkinList = getSkinDefine();
// } else {
// currentSkinList = [];
// List skinMapList = json.decode(skinJson);
// skinMapList.forEach((element) {
// currentSkinList.add(FUBeautyParam.fromJson(element));
// });
// }
currentSkinList.forEach((element) {
FUManager.setSkinBeautyParam(element);
});
// String facialJson =
// await AgoraSharedUtils.getString(AgoraSharedConstant.fcFacialShare);
// if (facialJson.length == 0) {
currentFacialList = getFacialDefine();
// } else {
// currentFacialList = [];
// List facialMapList = json.decode(facialJson);
// facialMapList.forEach((element) {
// currentFacialList.add(FUBeautyParam.fromJson(element));
// });
// }
currentFacialList.forEach((element) {
FUManager.setFacialBeautyParam(element);
});
// // String beautifyBodyJson =
// // await SharedUtils.getString(SharedConstant.fcBeautifyBodyShare);
// // if (beautifyBodyJson.length == 0) {
currentBeautifyBodyList = getBeautifyBodyDefine();
// // } else {
// // currentBeautifyBodyList = [];
// // List beautifyBodyMapList = json.decode(beautifyBodyJson);
// // beautifyBodyMapList.forEach((element) {
// // currentBeautifyBodyList.add(FUBeautyParam.fromJson(element));
// // });
// // }
// currentBeautifyBodyList.forEach((element) {
// FUManager.setBeautifyBodyBeautyParam(element);
// });
// String filterJson =
// await AgoraSharedUtils.getString(AgoraSharedConstant.fcFiltersShare);
// if (filterJson.length == 0) {
currentFiltersList = getFiltersDefine();
// } else {
// currentFiltersList = [];
// List filterMapList = json.decode(filterJson);
// filterMapList.forEach((element) {
// currentFiltersList.add(FUBeautyParam.fromJson(element));
// });
// }
// bool isSy = false;
// currentFiltersList.forEach((element) {
// if (element.isSeleted != null && element.isSeleted! && isSy == false) {
// isSy = true;
// FUManager.setFliterBeautyParam(element);
// }
// });
// String stickerJson =
// await SharedUtils.getString(SharedConstant.fcStickerShare);
// if (stickerJson.length == 0) {
// currentStickerList = getFiltersDefine();
// } else {
// currentFiltersList = [];
// List filterMapList = json.decode(filterJson);
// filterMapList.forEach((element) {
// currentFiltersList.add(FUBeautyParam.fromJson(element));
// });
// }
// String makeupJson =
// await SharedUtils.getString(SharedConstant.fcMakeupShare);
// if (makeupJson.length == 0) {
currentStickerList = getStickerDefine();
currentMakeupsList = getMakeupDefine();
// } else {
// currentMakeupsList = [];
// List makeupMapList = json.decode(makeupJson);
// makeupMapList.forEach((element) {
// currentMakeupsList.add(FUBeautyParam.fromJson(element));
// });
// }
}