LCOV - code coverage report
Current view: top level - models - calendar_day.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 6 8 75.0 %
Date: 2022-10-19 14:19:28 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:alh_calendar/enums/day_of_week.dart';
       2             : import 'package:flutter/cupertino.dart';
       3             : 
       4             : /// This class represents a day in the calendar.
       5             : @immutable
       6             : class CalendarDay {
       7             :   /// Every day has a specific DateTime
       8             :   final DateTime date;
       9             : 
      10             :   /// What day of the week is the day.
      11             :   final DayOfWeek dayOfWeek;
      12             : 
      13             :   /// If true the day lays in the current month.
      14             :   final bool isInCurrentMonth;
      15             : 
      16           7 :   const CalendarDay({
      17             :     required this.date,
      18             :     required this.dayOfWeek,
      19             :     required this.isInCurrentMonth,
      20             :   });
      21             : 
      22           6 :   @override
      23             :   bool operator ==(Object other) {
      24           6 :     return (other is CalendarDay) &&
      25          18 :         other.date == this.date &&
      26          18 :         other.dayOfWeek == this.dayOfWeek &&
      27          18 :         other.isInCurrentMonth == this.isInCurrentMonth;
      28             :   }
      29             : 
      30           0 :   @override
      31           0 :   int get hashCode => isInCurrentMonth.hashCode;
      32             : }

Generated by: LCOV version 1.16