cssFontSize method

String? cssFontSize(
  1. double? fontSize
)

Flutter font size --> CSS font size

Implementation

String? cssFontSize(double? fontSize) {
  if (fontSize == null) {
    return null;
  }

  // A quick hack that seems to work
  if (isIOS) {
    fontSize *= 2;
  }

  return '${fontSize.round()}pt';
}