Uncategorized

When writing unit tests, you may find that the test code tends to become complicated when writing with various test cases. For example, you can write tests in various cases, such as when testing a method that returns a certain… Continue Reading…

Dart null

If you ever work with Dart and wanna convert null to String? How does it work? Actually it’a bad idea. Don’t convert your null to String. You will get unexpected behavior. Your app might not crush. Here I got json… Continue Reading…

Dart completer

What is a completer? How to generate Future objects and complete them later using values ​​or errors When to use them? When it is necessary to create a Future from scratch(for example, when converting a callback-based API to a Future-based… Continue Reading…

Uncategorized

FutureOr contains Future. It’s like Future is subset of FutureOr. To me it sounds like better to use FutureOr on await/async operation, since it can handle both Future or non-Future types. Dart’s Flutter framework’s Riverpod package uses the FutureOr a… Continue Reading…