LCOV - code coverage report
Current view: | top level - src/models - resolution.dart (source / functions) |  |  | Hit | Total | Coverage
Test: | lcov.info |  | Lines: | 11 | 11 | 100.0 %
Date: | 2021-10-11 06:57:03 |  | Functions: | 0 | 0 | -

              Line data    Source code
           1             : import 'package:flutter/material.dart';
           2             :
           3             : class Resolution {
           4          22 :   const Resolution({
           5             :     required this.nativeSize,
           6             :     required this.scaleFactor,
           7             :   });
           8             :
           9           2 :   factory Resolution.dimensions({
          10             :     required double width,
          11             :     required double height,
          12             :     required double scaleFactor,
          13             :   }) {
          14           2 :     return Resolution(
          15           2 :       nativeSize: Size(width, height),
          16             :       scaleFactor: scaleFactor,
          17             :     );
          18             :   }
          19             :
          20           4 :   Size get logicalSize => nativeSize / scaleFactor;
          21             :   final Size nativeSize;
          22             :
          23             :   final double scaleFactor;
          24             :
          25           2 :   @override
          26             :   bool operator ==(Object other) {
          27             :     if (identical(this, other)) return true;
          28             :
          29           2 :     return other is Resolution &&
          30           6 :         other.nativeSize == nativeSize &&
          31           6 :         other.scaleFactor == scaleFactor;
          32             :   }
          33             :
          34           3 :   @override
          35          15 :   int get hashCode => nativeSize.hashCode ^ scaleFactor.hashCode;
          36             : }

Generated by: LCOV version 1.15