LCOV - code coverage report
Current view: top level - common - font_generic_family.dart Coverage Total Hit
Test: lcov_cleaned.info Lines: 0.0 % 11 0
Test Date: 2025-06-20 10:50:47 Functions: - 0 0

            Line data    Source code
       1              : /// Represents generic font families for text tracks in Google Cast.
       2              : ///
       3              : /// These values correspond to the CSS generic font families that can be
       4              : /// used for styling text tracks (captions/subtitles) in Cast media.
       5              : enum TextTrackFontGenericFamily {
       6              :   /// Sans-serif fonts (e.g., Arial, Helvetica).
       7              :   sansSerif,
       8              : 
       9              :   /// Monospaced sans-serif fonts (e.g., Courier New).
      10              :   monospacedSansSerif,
      11              : 
      12              :   /// Serif fonts (e.g., Times New Roman, Georgia).
      13              :   serif,
      14              : 
      15              :   /// Monospaced serif fonts.
      16              :   monospacedSerif,
      17              : 
      18              :   /// Casual or informal fonts.
      19              :   casual,
      20              : 
      21              :   /// Cursive or script fonts.
      22              :   cursive,
      23              : 
      24              :   /// Small capitals variant fonts.
      25              :   smallCapitals;
      26              : 
      27            0 :   factory TextTrackFontGenericFamily.fromMap(String value) {
      28              :     // Try matching by name (lowerCamelCase)
      29            0 :     for (final v in values) {
      30            0 :       if (v.name == value) return v;
      31              :     }
      32              :     // Fallback: match legacy UPPER_SNAKE_CASE
      33              :     switch (value) {
      34            0 :       case 'SANS_SERIF':
      35              :         return TextTrackFontGenericFamily.sansSerif;
      36            0 :       case 'MONOSPACED_SANS_SERIF':
      37              :         return TextTrackFontGenericFamily.monospacedSansSerif;
      38            0 :       case 'SERIF':
      39              :         return TextTrackFontGenericFamily.serif;
      40            0 :       case 'MONOSPACED_SERIF':
      41              :         return TextTrackFontGenericFamily.monospacedSerif;
      42            0 :       case 'CASUAL':
      43              :         return TextTrackFontGenericFamily.casual;
      44            0 :       case 'CURSIVE':
      45              :         return TextTrackFontGenericFamily.cursive;
      46            0 :       case 'SMALL_CAPITALS':
      47              :         return TextTrackFontGenericFamily.smallCapitals;
      48              :       default:
      49            0 :         throw ArgumentError('Unknown TextTrackFontGenericFamily: $value');
      50              :     }
      51              :   }
      52              : }
        

Generated by: LCOV version 2.3.1-1