sendSpValueToSwift static method
发送sp key 的值到Swift客户端
Implementation
static Future<void> sendSpValueToSwift(SwiftSpGetValueAction action,SocketConnect socketConnect) async {
_log(action.toJson());
final SharedPreferences prefs = await SharedPreferences.getInstance();
final object = prefs.get(action.data);
if(object==null){
Logger().w("not found!! ${action.data}");
}else{
socketConnect.sendDataByModel(SocketSendModel.sp(model: SpView.sendKeyValue(value: object),type: SpView.socketSpGetValuesKey));
}
}