sendSpValueToSwift method
发送sp key 的值到Swift客户端
Implementation
Future<void> sendSpValueToSwift(
SwiftSpGetValueAction action, SocketConnect socketConnect) async {
_log(action.toJson());
final SharedPreferences prefs = await _prefs;
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),
FlutterXSendDataType.spGetValue);
}
}