wafrat
  • Home
  • About
  • Contact me
Subscribe

Who's the gourmet brewmaster from Culinary Class Wars 2?

wafrat

Dec 16, 2025

The one who makes soju? https://www.instagram.com/yunjudang/. You're welcome!

Sign up for more like this.

Enter your email
Subscribe

Using SharedPreferences in tests

SharedPreferences actually provides an in-memory implementation, but it is not documented in the README. If you don't set it up, SharedPreferences throws a warning when it's used in tests: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences) The solution is to run SharedPreferences.setMockInitialValues(
Jan 3, 2026 — 1 min read

Mocking http.Client (updated)

In the previous post from 2022, we already saw that we can use Mockito with @GenerateNiceMocks to generate a MockClient, or use http's own MockClient and pass it to classes. But what if the code is from a package that does not accept a Client? Investigation In that case we
Jan 3, 2026 — 3 min read

Mocking cross-platform plugins like url_launcher

Today I wanted to mock url_launcher, but it was not as easy as the docs said. Here's the code I wanted to test: Future launchSearch(String word, SearchType searchType) async { final url = getSearchUrl(word, searchType); Uri uri = Uri.parse(url); if (await canLaunchUrl(uri)) { await launchUrl(uri); } else { throw
Dec 15, 2025 — 3 min read
wafrat © 2026