LCOV - code coverage report
Current view: top level - src - typedefs.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 6 7 85.7 %
Date: 2020-06-12 23:08:29 Functions: 0 0 -

          Line data    Source code
       1             : typedef FcBuilderFunc<S> = S Function();
       2             : 
       3             : typedef FcBuilderFuncAsync<S> = Future<S> Function();
       4             : 
       5             : class FcBuilder<S> {
       6             :   bool isSingleton;
       7             :   FcBuilderFunc builderFunc;
       8             :   S dependency;
       9             :   bool permanent = false;
      10             : 
      11           8 :   FcBuilder(this.isSingleton, this.builderFunc, this.permanent);
      12             : 
      13           8 :   S getSependency() {
      14           8 :     if (isSingleton) {
      15           8 :       if (dependency == null) {
      16          24 :         dependency = builderFunc() as S;
      17             :       }
      18           8 :       return dependency;
      19             :     } else {
      20           0 :       return builderFunc() as S;
      21             :     }
      22             :   }
      23             : }

Generated by: LCOV version 1.14