systemFontOf function
({List<String> ? fallback, String family})
systemFontOf(
- TargetPlatform platform, {
- bool display = false,
The system font a platform draws text at a size in, before the app's own.
Implementation
({String family, List<String>? fallback}) systemFontOf(
TargetPlatform platform, {
bool display = false,
}) => switch (platform) {
TargetPlatform.android ||
TargetPlatform.fuchsia => (family: 'Roboto', fallback: null),
// Apple switches between SF Pro Display and Text at 20 pt.
TargetPlatform.iOS => (
family: display ? 'CupertinoSystemDisplay' : 'CupertinoSystemText',
fallback: null,
),
TargetPlatform.macOS => (family: '.AppleSystemUIFont', fallback: null),
TargetPlatform.windows => (family: 'Segoe UI', fallback: null),
TargetPlatform.linux => (family: 'Roboto', fallback: _linuxFallback),
};