mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
21 lines
418 B
Swift
21 lines
418 B
Swift
//
|
|
// Store.swift
|
|
// WatchEnd Watch App
|
|
//
|
|
// Created by lolli on 2023/9/16.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class Store {
|
|
static let defaults = UserDefaults.standard
|
|
|
|
static let _ctxKey = "ctx"
|
|
static func getCtx() -> [String: Any] {
|
|
return defaults.object(forKey: _ctxKey) as? [String: Any] ?? [:]
|
|
}
|
|
static func setCtx(_ ctx: [String: Any]) {
|
|
defaults.set(ctx, forKey: _ctxKey)
|
|
}
|
|
}
|