Skip to content

Instantly share code, notes, and snippets.

@zgramming
Created September 23, 2019 09:08
Show Gist options
  • Save zgramming/102a3a176649dc739aab8b1ee8fe55a9 to your computer and use it in GitHub Desktop.
Save zgramming/102a3a176649dc739aab8b1ee8fe55a9 to your computer and use it in GitHub Desktop.
double screenWidth = MediaQuery.of(context).size.width;
double screenHeight = MediaQuery.of(context).size.height;
ScreenUtil.instance = ScreenUtil(
width: screenWidth, height: screenHeight, allowFontScaling: true)
..init(context);
double fontSizeInfo = ScreenUtil(allowFontScaling: true).setSp(12);
double fontSizeJudul = ScreenUtil(allowFontScaling: true).setSp(20);
double fontSizeIcon = ScreenUtil(allowFontScaling: true).setSp(20);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment