Skip to content

Instantly share code, notes, and snippets.

@Imperial-lord
Created March 27, 2021 00:08
Show Gist options
  • Save Imperial-lord/9571965d12e081ebdd88b315933e8bbf to your computer and use it in GitHub Desktop.
Save Imperial-lord/9571965d12e081ebdd88b315933e8bbf to your computer and use it in GitHub Desktop.
A list of all Text widgets that one will need through out the application.
import 'package:flutter/material.dart';
class MyFonts{
Text largeTitle(text, color){
return Text(text,style: TextStyle(fontFamily: 'poppins-bold', fontSize: 34, color: color),);
}
Text title1(text, color){
return Text(text,style: TextStyle(fontFamily: 'poppins-semi', fontSize: 22, color: color),);
}
Text heading1(text, color){
return Text(text,style: TextStyle(fontFamily: 'poppins-semi', fontSize: 17, color: color),);
}
Text heading2(text, color){
return Text(text,style: TextStyle(fontFamily: 'poppins-semi', fontSize: 15, color: color),);
}
Text body(text, color){
return Text(text,style: TextStyle(fontFamily: 'lato', fontSize: 15, color: color),);
}
Text subHeadline(text, color){
return Text(text,style: TextStyle(fontFamily: 'lato', fontSize: 13, color: color),);
}
Text caption(text, color){
return Text(text,style: TextStyle(fontFamily: 'lato', fontSize: 11, color: color),);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment