initializeDefaultTestScreenConfig function
Future<void>
initializeDefaultTestScreenConfig(
- TestScreenConfig config, {
- List<
TestScreenFont> fonts = const [], - bool loadDefaultFonts = true,
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.
Implementation
Future<void> initializeDefaultTestScreenConfig(TestScreenConfig config,
{List<TestScreenFont> fonts = const [],
bool loadDefaultFonts = true}) async {
defaultTestScreenConfig = config;
if (loadDefaultFonts) {
await loadAppFonts();
}
for (TestScreenFont font in fonts) {
_loadTestFont(font.family, font.fileName);
}
}