Skip to content

Instantly share code, notes, and snippets.

@tomaash
Created March 26, 2020 11:56
Show Gist options
  • Save tomaash/19a8cc8c87031aa32507b5f50e174d43 to your computer and use it in GitHub Desktop.
Save tomaash/19a8cc8c87031aa32507b5f50e174d43 to your computer and use it in GitHub Desktop.
Flutter styles used in my mobile app
class AppStyles {
static const defaultFont = 'Poppins';
static const paddingXl = EdgeInsets.all(32);
static const paddingLg = EdgeInsets.all(16);
static const paddingMd = EdgeInsets.all(8);
static const TextStyle textXxsMedium =
TextStyle(fontSize: 10, fontWeight: FontWeight.w500);
static const TextStyle textXxsGray =
TextStyle(fontSize: 10, color: Colors.black54);
static const TextStyle textXsGray =
TextStyle(fontSize: 12, color: Colors.black54);
static const TextStyle textXsLightGray =
TextStyle(fontSize: 12, color: Colors.black38);
static const TextStyle textSm = TextStyle(fontSize: 14);
static const TextStyle textSmMedium =
TextStyle(fontSize: 14, fontWeight: FontWeight.w500);
static const TextStyle textSmWhite =
TextStyle(fontSize: 14, color: Colors.white);
static final TextStyle textSmRed =
TextStyle(fontSize: 14, color: Colors.red[800]);
static const TextStyle textSmMediumGray =
TextStyle(fontSize: 14, fontWeight: FontWeight.w500, color: Colors.grey);
static const TextStyle textSmGray =
TextStyle(fontSize: 14, color: Colors.black54);
static const TextStyle textLgBold =
TextStyle(fontSize: 24, fontWeight: FontWeight.bold);
static const TextStyle textLgBlack =
TextStyle(fontSize: 24, fontWeight: FontWeight.bold, color: Colors.black);
static const TextStyle textXl = TextStyle(fontSize: 28);
static const TextStyle textXlGreen =
TextStyle(fontSize: 28, color: AppColors.darkGreenBackground);
static const TextStyle textMdGray =
TextStyle(fontSize: 18, color: Colors.black54);
static const TextStyle textMdWhite =
TextStyle(fontSize: 18, color: Colors.white, height: 1.5);
static const TextStyle textMdGrayLite =
TextStyle(fontSize: 18, color: Colors.black26);
static const TextStyle textMdBlack =
TextStyle(fontSize: 18, color: Colors.black);
static const TextStyle textMdBold =
TextStyle(fontSize: 18, fontWeight: FontWeight.bold);
static const TextStyle textMdMedium =
TextStyle(fontSize: 18, fontWeight: FontWeight.w500);
static const TextStyle bulletStyle =
TextStyle(fontSize: 40, fontWeight: FontWeight.w500);
static const roundDecoration = InputDecoration(
disabledBorder: Borders.disabledBorder,
enabledBorder: Borders.enabledBorder,
errorBorder: Borders.errorBorder,
focusedBorder: Borders.focusedBorder,
focusedErrorBorder: Borders.focusedErrorBorder,
contentPadding: paddingLg);
static const errorDecoration = InputDecoration(
enabledBorder: Borders.errorBorder,
errorBorder: Borders.errorBorder,
focusedBorder: Borders.focusedErrorBorder,
focusedErrorBorder: Borders.focusedErrorBorder,
);
static final perexStyleSheet = MarkdownStyleSheet(
textScaleFactor: 1.2,
p: TextStyle(fontWeight: FontWeight.w500, color: Colors.black));
static final bodyStyleSheet = MarkdownStyleSheet(
textScaleFactor: 1.2,
);
static final aboutStyleSheet = MarkdownStyleSheet(
textScaleFactor: 1.1,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment