|
1 | 1 | import 'package:flutter/material.dart';
|
| 2 | +import 'package:google_fonts/google_fonts.dart'; |
2 | 3 |
|
3 |
| -class LunaTextStyle extends TextStyle { |
4 |
| - const LunaTextStyle.labelMedium() |
5 |
| - : super( |
6 |
| - fontSize: 12.0, // md.sys.typescale.label-medium.size |
7 |
| - fontWeight: FontWeight.w500, // md.sys.typescale.label-medium.weight |
8 |
| - height: 16.0 / 12.0, // md.sys.typescale.label-medium.line-height |
9 |
| - ); |
| 4 | +class LunaTextStyle { |
| 5 | + static TextStyle bodySmall() { |
| 6 | + return GoogleFonts.robotoFlex( |
| 7 | + height: 16.0, // md.sys.typescale.body-small.line-height |
| 8 | + fontSize: 12.0, // md.sys.typescale.body-small.size |
| 9 | + fontWeight: FontWeight.w400, // md.sys.typescale.body-small.weight |
| 10 | + ); |
| 11 | + } |
| 12 | + |
| 13 | + static TextStyle bodyMedium() { |
| 14 | + return GoogleFonts.robotoFlex( |
| 15 | + height: 20.0, // md.sys.typescale.body-medium.line-height |
| 16 | + fontSize: 14.0, // md.sys.typescale.body-medium.size |
| 17 | + fontWeight: FontWeight.w400, // md.sys.typescale.body-medium.weight |
| 18 | + ); |
| 19 | + } |
| 20 | + |
| 21 | + static TextStyle bodyLarge() { |
| 22 | + return GoogleFonts.robotoFlex( |
| 23 | + height: 24.0, // md.sys.typescale.body-large.line-height |
| 24 | + fontSize: 16.0, // md.sys.typescale.body-large.size |
| 25 | + fontWeight: FontWeight.w400, // md.sys.typescale.body-large.weight |
| 26 | + ); |
| 27 | + } |
| 28 | + |
| 29 | + static TextStyle displaySmall() { |
| 30 | + return GoogleFonts.robotoFlex( |
| 31 | + height: 44.0, // md.sys.typescale.display-small.line-height |
| 32 | + fontSize: 36.0, // md.sys.typescale.display-small.size |
| 33 | + fontWeight: FontWeight.w400, // md.sys.typescale.display-small.weight |
| 34 | + ); |
| 35 | + } |
| 36 | + |
| 37 | + static TextStyle displayMedium() { |
| 38 | + return GoogleFonts.robotoFlex( |
| 39 | + height: 52.0, // md.sys.typescale.display-medium.line-height |
| 40 | + fontSize: 45.0, // md.sys.typescale.display-medium.size |
| 41 | + fontWeight: FontWeight.w400, // md.sys.typescale.display-medium.weight |
| 42 | + ); |
| 43 | + } |
| 44 | + |
| 45 | + static TextStyle displayLarge() { |
| 46 | + return GoogleFonts.robotoFlex( |
| 47 | + height: 64.0, // md.sys.typescale.display-large.line-height |
| 48 | + fontSize: 57.0, // md.sys.typescale.display-large.size |
| 49 | + fontWeight: FontWeight.w400, // md.sys.typescale.display-large.weight |
| 50 | + ); |
| 51 | + } |
| 52 | + |
| 53 | + static TextStyle headlineSmall() { |
| 54 | + return GoogleFonts.robotoFlex( |
| 55 | + height: 40.0, // md.sys.typescale.headline-small.line-height |
| 56 | + fontSize: 32.0, // md.sys.typescale.headline-small.size |
| 57 | + fontWeight: FontWeight.w400, // md.sys.typescale.headline-small.weight |
| 58 | + ); |
| 59 | + } |
| 60 | + |
| 61 | + static TextStyle headlineMedium() { |
| 62 | + return GoogleFonts.robotoFlex( |
| 63 | + height: 36.0, // md.sys.typescale.headline-medium.line-height |
| 64 | + fontSize: 28.0, // md.sys.typescale.headline-medium.size |
| 65 | + fontWeight: FontWeight.w400, // md.sys.typescale.headline-medium.weight |
| 66 | + ); |
| 67 | + } |
| 68 | + |
| 69 | + static TextStyle headlineLarge() { |
| 70 | + return GoogleFonts.robotoFlex( |
| 71 | + height: 32.0, // md.sys.typescale.headline-large.line-height |
| 72 | + fontSize: 24.0, // md.sys.typescale.headline-large.size |
| 73 | + fontWeight: FontWeight.w400, // md.sys.typescale.headline-large.weight |
| 74 | + ); |
| 75 | + } |
| 76 | + |
| 77 | + static TextStyle labelSmall() { |
| 78 | + return GoogleFonts.robotoFlex( |
| 79 | + height: 16.0, // md.sys.typescale.label-small.line-height |
| 80 | + fontSize: 11.0, // md.sys.typescale.label-small.size |
| 81 | + fontWeight: FontWeight.w500, // md.sys.typescale.label-small.weight |
| 82 | + ); |
| 83 | + } |
| 84 | + |
| 85 | + static TextStyle labelMedium() { |
| 86 | + return GoogleFonts.robotoFlex( |
| 87 | + height: 16.0, // md.sys.typescale.label-medium.line-height |
| 88 | + fontSize: 12.0, // md.sys.typescale.label-medium.size |
| 89 | + fontWeight: FontWeight.w500, // md.sys.typescale.label-medium.weight |
| 90 | + ); |
| 91 | + } |
| 92 | + |
| 93 | + static TextStyle labelLarge() { |
| 94 | + return GoogleFonts.robotoFlex( |
| 95 | + height: 20.0, // md.sys.typescale.label-large.line-height |
| 96 | + fontSize: 14.0, // md.sys.typescale.label-large.size |
| 97 | + fontWeight: FontWeight.w500, // md.sys.typescale.label-large.weight |
| 98 | + ); |
| 99 | + } |
| 100 | + |
| 101 | + static TextStyle titleSmall() { |
| 102 | + return GoogleFonts.robotoFlex( |
| 103 | + height: 20.0, // md.sys.typescale.title-small.line-height |
| 104 | + fontSize: 14.0, // md.sys.typescale.title-small.size |
| 105 | + fontWeight: FontWeight.w500, // md.sys.typescale.title-small.weight |
| 106 | + ); |
| 107 | + } |
| 108 | + |
| 109 | + static TextStyle titleMedium() { |
| 110 | + return GoogleFonts.robotoFlex( |
| 111 | + height: 24.0, // md.sys.typescale.title-medium.line-height |
| 112 | + fontSize: 16.0, // md.sys.typescale.title-medium.size |
| 113 | + fontWeight: FontWeight.w500, // md.sys.typescale.title-medium.weight |
| 114 | + ); |
| 115 | + } |
| 116 | + |
| 117 | + static TextStyle titleLarge() { |
| 118 | + return GoogleFonts.robotoFlex( |
| 119 | + height: 28.0, // md.sys.typescale.title-large.line-height |
| 120 | + fontSize: 22.0, // md.sys.typescale.title-large.size |
| 121 | + fontWeight: FontWeight.w400, // md.sys.typescale.title-large.weight |
| 122 | + ); |
| 123 | + } |
10 | 124 | }
|
0 commit comments