logoRobert Brunhage

  • Home
  • Courses
  • Videos
  • Articles
  • Sign In
  • Setup / UI
  • Overview
  • Structure and Linting
  • Palette and Theme
  • Flow of Pages
  • Landing and Navigation
  • Genre Screen
  • Rating and Years back screen
  • Result Screen
  • State Management with Riverpod
  • Overview
  • MovieFlow State
  • Controller and Provider
  • Transitioning to Riverpod
  • API and Architecture
  • Overview
  • API
  • Mapping and Entities
  • Creating the repository
  • Creating the service
  • AsyncValue and Fetching
  • What is a Repository-Service pattern
  • What is an Entity
  • What is AsyncValue
  • Error Handling
  • Overview
  • Throwing custom failure
  • Multiple return types
  • Failure Screen
  • Multiple return types
  • Repository-service pattern power
  • Testing
  • Overview
  • What is mocking
  • Unit test service
  • Unit test controller
  • Widget tests
  • Integration tests with stubbing
  • Stub vs Fake
  • Why testing
  • Solid Animations
  • Overview
  • Image fade
  • Staggered Animation part 1
  • Staggered Animation part 2
  • Animation concepts
  • Ending
  • Bonus
  • Bonus Lecture - CI

You must sign in to watch.

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!

Find an issue with this page? Post it on GitHub!

Cookie Policy

Copyright © 2023 Robert Brunhage

  • twitter
  • discord
  • youtube
  • patreon