LCOV - code coverage report
Current view: top level - src/models - component.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 14 14 100.0 %
Date: 2021-11-17 11:54:54 Functions: 0 0 -

          Line data    Source code
       1             : import 'dart:convert';
       2             : 
       3             : import 'package:collection/collection.dart';
       4             : import 'package:flutter/material.dart';
       5             : 
       6             : import 'package:bootstrap_flutter/bootstrap_flutter.dart';
       7             : 
       8             : class Component {
       9             :   final String style;
      10             :   final Widget child;
      11             :   final Map<TypeScreen, Organization> organizations;
      12             : 
      13           3 :   Component(
      14             :       {required this.style,
      15             :       required this.child,
      16             :       this.organizations = const {}});
      17           3 :   Component copyWith({
      18             :     Map<TypeScreen, Organization>? organizations,
      19             :   }) {
      20           3 :     return Component(
      21           3 :       style: this.style,
      22           3 :       child: this.child,
      23           1 :       organizations: organizations ?? this.organizations,
      24             :     );
      25             :   }
      26             : 
      27           1 :   @override
      28             :   bool operator ==(Object other) {
      29             :     if (identical(this, other)) return true;
      30           1 :     final mapEquals = const DeepCollectionEquality().equals;
      31             : 
      32           1 :     return other is Component &&
      33           3 :         other.style == style &&
      34           3 :         other.child == child &&
      35           2 :         mapEquals(other.organizations, organizations);
      36             :   }
      37             : 
      38           1 :   @override
      39           8 :   int get hashCode => style.hashCode ^ child.hashCode ^ organizations.hashCode;
      40             : }

Generated by: LCOV version 1.15