LCOV - code coverage report
Current view: top level - _configs - custom_text_theme.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 43 0.0 %
Date: 2024-10-04 11:08:31 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2023 The terCAD team. All rights reserved.
       2             : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
       3             : 
       4             : import 'package:app_finance/_configs/custom_color_scheme.dart';
       5             : import 'package:flutter/foundation.dart';
       6             : import 'package:flutter/material.dart';
       7             : import 'package:google_fonts/google_fonts.dart';
       8             : 
       9             : extension CustomTextTheme on TextTheme {
      10           0 :   double letterSpacingOrNone(double letterSpacing) => kIsWeb ? 0.0 : letterSpacing;
      11             : 
      12           0 :   TextTheme? withCustom(String paletteType, Brightness brightness) {
      13           0 :     final color = AppColors(paletteType, brightness).palette.secondary;
      14           0 :     return copyWith(
      15           0 :       titleLarge: GoogleFonts.abel(
      16             :         fontSize: 32,
      17             :         fontWeight: FontWeight.w400,
      18             :         color: color,
      19           0 :         letterSpacing: letterSpacingOrNone(1.2),
      20             :       ),
      21           0 :       titleMedium: GoogleFonts.abel(
      22             :         fontSize: 18,
      23             :         fontWeight: FontWeight.w400,
      24             :         color: color,
      25           0 :         letterSpacing: letterSpacingOrNone(1.2),
      26             :       ),
      27           0 :       titleSmall: GoogleFonts.abel(
      28             :         fontSize: 12,
      29             :         fontWeight: FontWeight.w400,
      30             :         color: color,
      31           0 :         letterSpacing: letterSpacingOrNone(1.2),
      32             :       ),
      33           0 :       headlineLarge: GoogleFonts.abel(
      34             :         fontSize: 32,
      35             :         fontWeight: FontWeight.w400,
      36             :         color: color,
      37           0 :         letterSpacing: letterSpacingOrNone(1.2),
      38             :       ),
      39           0 :       headlineMedium: GoogleFonts.abel(
      40             :         fontSize: 14,
      41             :         fontWeight: FontWeight.w600,
      42           0 :         letterSpacing: letterSpacingOrNone(1.2),
      43             :       ),
      44           0 :       headlineSmall: GoogleFonts.abel(
      45             :         fontSize: 12,
      46             :         fontWeight: FontWeight.w600,
      47             :         color: color,
      48           0 :         letterSpacing: letterSpacingOrNone(1.2),
      49             :       ),
      50           0 :       bodyLarge: GoogleFonts.abel(
      51             :         fontSize: 16,
      52             :         fontWeight: FontWeight.w600,
      53             :         color: color,
      54           0 :         letterSpacing: letterSpacingOrNone(1.2),
      55             :       ),
      56           0 :       bodyMedium: GoogleFonts.abel(
      57             :         fontSize: 14,
      58             :         fontWeight: FontWeight.w400,
      59           0 :         letterSpacing: letterSpacingOrNone(1.2),
      60             :       ),
      61           0 :       bodySmall: GoogleFonts.abel(
      62             :         fontSize: 10,
      63             :         fontWeight: FontWeight.w600,
      64             :         color: color,
      65           0 :         letterSpacing: letterSpacingOrNone(1.6),
      66             :       ),
      67           0 :       labelLarge: GoogleFonts.abel(
      68             :         fontSize: 12,
      69             :         fontWeight: FontWeight.w600,
      70           0 :         letterSpacing: letterSpacingOrNone(1.2),
      71             :       ),
      72           0 :       labelMedium: GoogleFonts.abel(
      73             :         fontSize: 10,
      74             :         fontWeight: FontWeight.w600,
      75             :         color: color,
      76           0 :         letterSpacing: letterSpacingOrNone(1.2),
      77             :       ),
      78           0 :       labelSmall: GoogleFonts.abel(
      79             :         fontSize: 8,
      80             :         fontWeight: FontWeight.w600,
      81             :         color: color,
      82           0 :         letterSpacing: letterSpacingOrNone(1.2),
      83             :       ),
      84             :     );
      85             :   }
      86             : 
      87           0 :   TextStyle get tooltipSmall => GoogleFonts.robotoCondensed(
      88             :         fontSize: 12,
      89             :         fontWeight: FontWeight.w400,
      90           0 :         color: titleLarge?.color?.withOpacity(0.4),
      91           0 :         letterSpacing: letterSpacingOrNone(0.5),
      92             :       );
      93             : 
      94           0 :   TextStyle get tooltipMedium => GoogleFonts.robotoCondensed(
      95             :         fontSize: 16,
      96             :         fontWeight: FontWeight.w400,
      97           0 :         color: titleLarge?.color?.withOpacity(0.4),
      98           0 :         letterSpacing: letterSpacingOrNone(0.5),
      99             :       );
     100             : 
     101           0 :   TextStyle get numberLarge => GoogleFonts.robotoCondensed(
     102             :         fontSize: 32,
     103             :         fontWeight: FontWeight.w400,
     104           0 :         color: titleLarge?.color,
     105           0 :         letterSpacing: letterSpacingOrNone(0.5),
     106             :       );
     107             : 
     108           0 :   TextStyle get numberMedium => GoogleFonts.robotoCondensed(
     109             :         fontSize: 16,
     110             :         fontWeight: FontWeight.w400,
     111           0 :         color: titleLarge?.color,
     112           0 :         letterSpacing: letterSpacingOrNone(0.5),
     113             :       );
     114             : 
     115           0 :   TextStyle get numberSmall => GoogleFonts.robotoCondensed(
     116             :         fontSize: 10,
     117             :         fontWeight: FontWeight.w400,
     118           0 :         color: titleLarge?.color,
     119           0 :         letterSpacing: letterSpacingOrNone(0.5),
     120             :       );
     121             : }

Generated by: LCOV version 1.14