LCOV - code coverage report
Current view: top level - lib/pages/bill/widgets - bill_header_widget.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 0 30 0.0 %
Date: 2024-10-04 11:09:33 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/herald/app_design.dart';
       5             : import 'package:app_finance/_classes/herald/app_locale.dart';
       6             : import 'package:app_finance/_classes/structure/bill_app_data.dart';
       7             : import 'package:app_finance/_ext/build_context_ext.dart';
       8             : import 'package:app_finance/_configs/custom_text_theme.dart';
       9             : import 'package:app_finance/_ext/date_time_ext.dart';
      10             : import 'package:app_finance/design/wrapper/number_wrapper.dart';
      11             : import 'package:app_finance/design/wrapper/row_widget.dart';
      12             : import 'package:app_finance/_configs/theme_helper.dart';
      13             : import 'package:app_finance/design/wrapper/text_wrapper.dart';
      14             : import 'package:flutter/material.dart';
      15             : 
      16             : class BillHeaderWidget extends StatelessWidget {
      17             :   final BillAppData item;
      18             :   final double width;
      19             : 
      20           0 :   const BillHeaderWidget({
      21             :     super.key,
      22             :     required this.item,
      23             :     required this.width,
      24             :   });
      25             : 
      26           0 :   @override
      27             :   Widget build(BuildContext context) {
      28           0 :     final textTheme = context.textTheme;
      29           0 :     final indent = ThemeHelper.getIndent();
      30           0 :     return Column(
      31           0 :       children: [
      32           0 :         RowWidget(
      33             :           indent: indent,
      34           0 :           alignment: AppDesign.getAlignment<MainAxisAlignment>(),
      35           0 :           maxWidth: width,
      36             :           chunk: const [null, null],
      37           0 :           children: [
      38           0 :             [
      39           0 :               Row(
      40           0 :                 children: [
      41           0 :                   Icon(item.icon, color: item.color, size: 20),
      42             :                   ThemeHelper.wIndent,
      43           0 :                   TextWrapper(
      44           0 :                     item.title,
      45           0 :                     style: textTheme.headlineMedium,
      46             :                   ),
      47             :                 ],
      48             :               ),
      49           0 :               TextWrapper(
      50           0 :                 '${AppLocale.labels.accountFrom}: ${item.accountNamed}',
      51           0 :                 style: textTheme.bodySmall,
      52             :               ),
      53             :             ],
      54           0 :             [
      55           0 :               Align(
      56             :                 alignment: Alignment.centerRight,
      57           0 :                 child: NumberWidget(
      58           0 :                   item.detailsFormatted,
      59           0 :                   colorScheme: context.colorScheme,
      60           0 :                   style: textTheme.numberMedium,
      61             :                 ),
      62             :               ),
      63           0 :               Align(
      64             :                 alignment: Alignment.centerRight,
      65           0 :                 child: TextWrapper(
      66           0 :                   item.createdAt.dateTime(),
      67           0 :                   style: textTheme.numberSmall,
      68             :                 ),
      69             :               ),
      70             :             ],
      71             :           ],
      72             :         ),
      73             :       ],
      74             :     );
      75             :   }
      76             : }

Generated by: LCOV version 1.14