LCOV - code coverage report
Current view: top level - src/models/organizers - organizer.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 7 7 100.0 %
Date: 2021-10-28 11:30:47 Functions: 0 0 -

          Line data    Source code
       1             : /// Organizer is an abstract model which helps to
       2             : /// structure Categories, WidgetElements and Stories in the folder tree.
       3             : abstract class Organizer {
       4           5 :   Organizer(this.name);
       5             : 
       6             :   /// Used to display the name of the Folder or WidgetElement
       7             :   final String name;
       8             : 
       9             :   /// Used for navigation and matching hot reloaded elements with existing
      10           2 :   String get path {
      11           6 :     var path = name.replaceAll(' ', '-').toLowerCase();
      12           2 :     var current = parent;
      13           1 :     while (current?.parent != null) {
      14           4 :       path = '${current!.name.replaceAll(' ', '-').toLowerCase()}${'/$path'}';
      15           1 :       current = current.parent;
      16             :     }
      17             :     return path;
      18             :   }
      19             : 
      20             :   /// The Organizer hosting this element.
      21             :   Organizer? parent;
      22             : }

Generated by: LCOV version 1.15