I have seen SharedPreferences.setInitialMockValues or something like that. Still, since SharedPreferences has become a legacy API and with the new SharedPreferencesAsync/SharedPreferencesWithCache API, I cannot find a way to create mocks for them for testing.
A way to mock SharedPreferencesAsyncSharedPreferencesWithCache in flutter - Stack Overflow
评论列表(0)
- 暂无评论