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

            Line data    Source code
       1              : /// User actions.
       2              : enum UserAction {
       3              :   /// User indicates a like preference for the currently playing content.
       4              :   like,
       5              : 
       6              :   /// User indicates a dislike preference for the currently playing content.
       7              :   dislike,
       8              : 
       9              :   /// User wants to follow or star currently playing content.
      10              :   follow,
      11              : 
      12              :   /// User wants to stop following currently playing content.
      13              :   unfollow;
      14              : 
      15            0 :   factory UserAction.fromMap(String value) {
      16              :     // Try matching by name (lowerCamelCase)
      17            0 :     for (final v in values) {
      18            0 :       if (v.name == value) return v;
      19              :     }
      20              :     // Fallback: match legacy UPPER_SNAKE_CASE
      21              :     switch (value) {
      22            0 :       case 'LIKE':
      23              :         return UserAction.like;
      24            0 :       case 'DISLIKE':
      25              :         return UserAction.dislike;
      26            0 :       case 'FOLLOW':
      27              :         return UserAction.follow;
      28            0 :       case 'UNFOLLOW':
      29              :         return UserAction.unfollow;
      30              :       default:
      31            0 :         throw ArgumentError('Unknown UserAction: $value');
      32              :     }
      33              :   }
      34              : 
      35            0 :   @override
      36              :   String toString() {
      37            0 :     return name;
      38              :   }
      39              : }
        

Generated by: LCOV version 2.3.1-1