class fontstyle { static FontWeight? Fontweights({FWT fontWeight = FWT.regular}) { switch (FWT) { case FWT.bold: return FontWeight.w700; case FWT.semiBold: return FontWeight.w600; case FWT.medium: return FontWeight.w500; case FWT.regular: return FontWeight.w400; case FWT.light: return FontWeight.w300; default: return FontWeight.w400; } } static TextStyle f14( {required Color colors, FWT? fontweight, double height = 0.0}) { return TextStyle( fontSize: 14.sp, fontFamily: "Poppins", fontWeight: Fontweights(fontWeight: fontweight!), color: Colors.amberAccent); } static TextStyle f12( {required Color colors, FWT? fontweight, double height = 0.0}) { return TextStyle( fontSize: 12.sp, fontFamily: "Poppins", fontWeight: Fontweights(fontWeight: fontweight!), color: Colors.amberAccent); } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter