concept dart unit in category flutter
appears as: Dart unit

This is an excerpt from Manning's book Flutter in Action.
Dart unit tests—When you need to test classes or functions, but there are no widgets involved. I’ll use the mockito package for this to test HTTP calls.
Dart unit tests rely on three main functions from the test lib: test, expect, and group. The easiest way to explain how to write tests is to show some examples. This isn’t the full example, but an example of a single test—the most basic test possible. If you’ve written tests in any other modern language, this will be pretty easy to read.