getFont function

String getFont()

Private API to get the current Design's font.

Implementation

String getFont() {
  if (Design.isMaterial()) {
    return 'Roboto';
  } else if (Design.isCupertino() || Design.isMacOS()) {
    return 'SFPro';
  } else if (Design.isFluent()) {
    return 'SegoeUI';
  } else if (Design.isYaru()) {
    return 'Ubuntu';
  } else {
    throw Exception('Unknown platform: ${getPlatform()}');
  }
}