LCOV - code coverage report
Current view: top level - _ext - data_ext.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 7 0.0 %
Date: 2024-10-04 11:08:31 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2024 The terCAD team. All rights reserved.
       2             : // Use of this source code is governed by a CC BY-NC-ND 4.0 license that can be found in the LICENSE file.
       3             : 
       4             : import 'package:app_finance/_classes/storage/app_data.dart';
       5             : import 'package:app_finance/_classes/structure/abstract_app_data.dart';
       6             : import 'package:app_finance/_classes/structure/account_app_data.dart';
       7             : import 'package:app_finance/_classes/structure/bill_app_data.dart';
       8             : import 'package:app_finance/_classes/structure/budget_app_data.dart';
       9             : import 'package:app_finance/_classes/structure/currency_app_data.dart';
      10             : import 'package:app_finance/_classes/structure/goal_app_data.dart';
      11             : import 'package:app_finance/_classes/structure/invoice_app_data.dart';
      12             : 
      13             : extension DataExt on String {
      14           0 :   AbstractAppData? toDataObject(Map<String, dynamic> data, AppData store) => switch (this) {
      15           0 :         'GoalAppData' => GoalAppData.fromJson(data),
      16           0 :         'AccountAppData' => AccountAppData.fromJson(data),
      17           0 :         'BillAppData' => BillAppData.fromJson(data)..setState(store),
      18           0 :         'BudgetAppData' => BudgetAppData.fromJson(data)..setState(store),
      19           0 :         'CurrencyAppData' => CurrencyAppData.fromJson(data),
      20           0 :         'InvoiceAppData' => InvoiceAppData.fromJson(data)..setState(store),
      21             :         _ => null,
      22             :       };
      23             : }

Generated by: LCOV version 1.14