LCOV - code coverage report
Current view: top level - lib - torstatus.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 13 0.0 %
Date: 2024-02-26 20:09:01 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:flutter/material.dart';
       2             : 
       3             : class TorStatus extends ChangeNotifier {
       4             :   int progress;
       5             :   String status;
       6             :   bool connected;
       7             :   String version;
       8             : 
       9           0 :   TorStatus({this.connected = false, this.progress = 0, this.status = "", this.version = ""});
      10             : 
      11             :   /// Called by the event bus.
      12           0 :   handleUpdate(int newProgress, String newStatus) {
      13           0 :     if (progress == 100) {
      14           0 :       connected = true;
      15             :     } else {
      16           0 :       connected = false;
      17             :     }
      18             : 
      19           0 :     progress = newProgress;
      20           0 :     status = newStatus;
      21           0 :     if (newProgress != 100) {
      22           0 :       status = "$newProgress% - $newStatus";
      23             :     }
      24             : 
      25           0 :     notifyListeners();
      26             :   }
      27             : 
      28           0 :   updateVersion(String newVersion) {
      29           0 :     version = newVersion;
      30           0 :     notifyListeners();
      31             :   }
      32             : }

Generated by: LCOV version 1.14