我正在使用flutter_isolate插件,我正在尝试从SharedPreferences隔离中删除一个项目。但这似乎不起作用。当我尝试访问它时,该项目仍然存在于主线程中。以下是我删除隔离中项目的代码:
SharedPreferences pref = await SharedPreferences.getInstance();
bool x = await pref.remove('image_post_data');
if (x == true) print('removed image_post_data'); // This is printed out
但是当我尝试image_post_data在主线程上访问时,我仍然得到值而不是得到一个空值。我错过了什么?