setCatch function

void setCatch(
  1. String key,
  2. String content
)

设置 sessionStorage 缓存

Implementation

void setCatch(String key, String content) async {
  final SharedPreferences prefs = await SharedPreferences.getInstance();
  await prefs.setString(key, content);
}