LCOV - code coverage report
Current view: top level - code_generators/instances - function_call_instance.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 3 33.3 %
Date: 2021-11-02 09:21:23 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:meta/meta.dart';
       2             : import 'package:widgetbook_generator/code_generators/instances/base_instance.dart';
       3             : 
       4             : @immutable
       5             : 
       6             : /// Calls a function.
       7             : ///
       8             : /// Example:
       9             : /// for a lambda function defined as `() => getTheme()`
      10             : /// would call it as `getTheme()`
      11             : class FunctionCallInstance extends BaseInstance {
      12             :   /// Create a new instace of [FunctionCallInstance]
      13           2 :   const FunctionCallInstance({
      14             :     required this.name,
      15             :   });
      16             : 
      17             :   /// The name of the function
      18             :   final String name;
      19             : 
      20           0 :   @override
      21             :   String toCode() {
      22           0 :     return '$name()';
      23             :   }
      24             : }

Generated by: LCOV version 1.15