| 1 | import 'package:cake_wallet/utils/feature_flag.dart'; |
| 2 | import 'package:flutter/material.dart'; |
| 3 | |
| 4 | const latoFont = "Lato"; |
| 5 | const wixFont = "Wix Madefor Text"; |
| 6 | |
| 7 | TextStyle textXxSmall({Color? color}) => _cakeRegular(10, color); |
| 8 | |
| 9 | TextStyle textXxSmallSemiBold({Color? color}) => _cakeSemiBold(10, color); |
| 10 | |
| 11 | TextStyle textXSmall({Color? color}) => _cakeRegular(12, color); |
| 12 | |
| 13 | TextStyle textXSmallSemiBold({Color? color}) => _cakeSemiBold(12, color); |
| 14 | |
| 15 | TextStyle textSmall({Color? color}) => _cakeRegular(14, color); |
| 16 | |
| 17 | TextStyle textSmallSemiBold({Color? color}) => _cakeSemiBold(14, color); |
| 18 | |
| 19 | TextStyle textMedium({Color? color}) => _cakeRegular(16, color); |
| 20 | |
| 21 | TextStyle textMediumBold({Color? color}) => _cakeBold(16, color); |
| 22 | |
| 23 | TextStyle textMediumSemiBold({Color? color}) => _cakeSemiBold(22, color); |
| 24 | |
| 25 | TextStyle textLarge({Color? color}) => _cakeRegular(18, color); |
| 26 | |
| 27 | TextStyle textLargeBold({Color? color}) => _cakeBold(18, color); |
| 28 | |
| 29 | TextStyle textLargeSemiBold({Color? color}) => _cakeSemiBold(24, color); |
| 30 | |
| 31 | TextStyle textXLarge({Color? color}) => _cakeRegular(32, color); |
| 32 | |
| 33 | TextStyle textXLargeSemiBold({Color? color}) => _cakeSemiBold(32, color); |
| 34 | |
| 35 | TextStyle _cakeRegular(double size, Color? color) => _textStyle( |
| 36 | size: size, |
| 37 | fontWeight: FontWeight.normal, |
| 38 | color: color, |
| 39 | ); |
| 40 | |
| 41 | TextStyle _cakeBold(double size, Color? color) => _textStyle( |
| 42 | size: size, |
| 43 | fontWeight: FontWeight.w900, |
| 44 | color: color, |
| 45 | ); |
| 46 | |
| 47 | TextStyle _cakeSemiBold(double size, Color? color) => _textStyle( |
| 48 | size: size, |
| 49 | fontWeight: FontWeight.w700, |
| 50 | color: color, |
| 51 | ); |
| 52 | |
| 53 | TextStyle _textStyle({ |
| 54 | required double size, |
| 55 | required FontWeight fontWeight, |
| 56 | Color? color, |
| 57 | }) => |
| 58 | TextStyle( |
| 59 | fontFamily: FeatureFlag.hasNewUi ? wixFont : latoFont, |
| 60 | fontSize: size, |
| 61 | fontWeight: fontWeight, |
| 62 | color: color ?? Colors.white, |
| 63 | ); |