test_screen
library
Enums
UITargetPlatform
The platform that user interaction should adapt to target.
This is the same enum than TargetPlatform
on foundation/platform.dart,
but web is added
Functions
initializeDefaultTestScreenConfig (TestScreenConfig config , {List <TestScreenFont > fonts = const [] , bool loadDefaultFonts = true })
→ Future <void >
Initialize the default configuration for all the screen tests.
fonts
are a list of fonts to use in the screen test.
loadDefaultFonts
loads all the fonts that you have on your project,
additionally test_screen have a Roboto font for Android and a SFProDisplay-Regular
and SFProText-Regular for iOS.
testScreen (Object description , Future <Widget > createScreen (), Future <void > onTest (WidgetTester tester ), {TestScreenConfig ? config , UITargetPlatform ? onlyPlatform })
→ void
It does exactly the same than testScreenUI , but doesn't do the
golden files bitmap comparison.
testScreenUI (Object description , Future <Widget > createScreen (), {Future <void > onTest (WidgetTester tester )?, String ? goldenDir , TestScreenConfig ? config , UITargetPlatform ? onlyPlatform })
→ void
Use this function for testing custom StatelessWidget s and
StatefulWidget s that represent screens.