Member-only story

Move Mocking To The Flutter Data Class For Less Test Code

Fred Grott
3 min readOct 2, 2023

If I was an GDE, this new way of creating Flutter data classes would be taught by me as it integrates with a new strategy of integrating all flutter testing strategies together with a new storyboarding way Google is moving towards.

Let me show you how!

Background

Google recently has agreed to contribute and maintain the storyboard package called stager:

At Pub Dev

The new Google GitHub location (package has not been put on pub dev yet)

Hidden in the example source code is a new way to mock the model API of an app so that it is reachable to several testing APIs and methods we have in flutter app development. It just needs some

--

--

Fred Grott
Fred Grott

Responses (1)