Flutter Mocking packages
There are two packages that are the main ones which are mockito and mocktail. You are free to use whichever you like the most. I personally prefer mocktail as it doesn't require code-generation which is a huge plus as it can be quite tedious to do.
We use mocks to make sure that our dependencies (things like the repository) do not rely on services/APIs' that we have no control over!