LCOV - code coverage report
Current view: top level - lib/pages/subscription/widgets - apple_widget.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 18 5.6 %
Date: 2024-09-15 16:50:22 Functions: 0 0 -

          Line data    Source code
       1             : // Copyright 2023 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/controller/purchase_controller.dart';
       5             : import 'package:app_finance/_classes/herald/app_locale.dart';
       6             : import 'package:app_finance/_classes/herald/app_purchase.dart';
       7             : import 'package:app_finance/_configs/theme_helper.dart';
       8             : import 'package:app_finance/pages/subscription/widgets/purchase_widget.dart';
       9             : import 'package:flutter/material.dart';
      10             : import 'package:provider/provider.dart';
      11             : 
      12             : class AppleWidget extends StatelessWidget {
      13           5 :   const AppleWidget({super.key});
      14             : 
      15           0 :   @override
      16             :   Widget build(BuildContext context) {
      17           0 :     final indent = ThemeHelper.getIndent(2);
      18           0 :     final purchases = context.watch<AppPurchase>();
      19             : 
      20           0 :     return Wrap(
      21             :       spacing: indent,
      22             :       runSpacing: indent,
      23           0 :       children: [
      24           0 :         PurchaseWidget(
      25             :           'assets/images/coffee.png',
      26           0 :           title: AppLocale.labels.subscriptionCoffee,
      27           0 :           product: purchases.product[PurchaseController.pCoffee],
      28           0 :           purchase: purchases.purchase[PurchaseController.pCoffee],
      29             :         ),
      30           0 :         PurchaseWidget(
      31             :           'assets/images/dinner.png',
      32           0 :           title: AppLocale.labels.subscriptionDinner,
      33           0 :           product: purchases.product[PurchaseController.pDinner],
      34           0 :           purchase: purchases.purchase[PurchaseController.pDinner],
      35             :         ),
      36           0 :         PurchaseWidget(
      37             :           'assets/images/coin.png',
      38           0 :           title: AppLocale.labels.subscriptionTiny,
      39           0 :           product: purchases.product[PurchaseController.pInitial],
      40           0 :           purchase: purchases.purchase[PurchaseController.pInitial],
      41             :         ),
      42             :       ],
      43             :     );
      44             :   }
      45             : }

Generated by: LCOV version 1.14