systemFontFamily property
override
The system font family to use for this test.
Defaults to the value provided by PlatformDispatcher.systemFontFamily. This can only be set in a test environment to emulate different platform configurations. A standard PlatformDispatcher is not mutable from the framework.
Setting this value to null
will force systemFontFamily to return
null
. If you want to have the value default to the platform
systemFontFamily, use resetSystemFontFamily.
See also:
- PlatformDispatcher.systemFontFamily for the standard implementation
- resetSystemFontFamily to reset this value specifically
- clearAllTestValues to reset all test values for this view
Implementation
@override
String? get systemFontFamily {
return _forceSystemFontFamilyToBeNull
? null
: _systemFontFamily ?? _platformDispatcher.systemFontFamily;
}
Implementation
set systemFontFamily(String? value) {
_systemFontFamily = value;
if (value == null) {
_forceSystemFontFamilyToBeNull = true;
}
onSystemFontFamilyChanged?.call();
}