LCOV - code coverage report
Current view: top level - lib/pages/subscription - subscription_page.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 31 3.2 %
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_locale.dart';
       5             : import 'package:app_finance/_classes/structure/navigation/app_route.dart';
       6             : import 'package:app_finance/_configs/theme_helper.dart';
       7             : import 'package:app_finance/pages/_interfaces/abstract_page_state.dart';
       8             : import 'package:app_finance/pages/subscription/widgets/apple_widget.dart';
       9             : import 'package:app_finance/pages/subscription/widgets/google_widget.dart';
      10             : import 'package:app_finance/pages/subscription/widgets/other_widget.dart';
      11             : import 'package:app_finance/design/wrapper/row_widget.dart';
      12             : import 'package:app_finance/design/wrapper/text_wrapper.dart';
      13             : import 'package:flutter/material.dart';
      14             : import 'package:flutter/foundation.dart';
      15             : 
      16             : class SubscriptionPage extends StatefulWidget {
      17           5 :   const SubscriptionPage({super.key});
      18             : 
      19           0 :   @override
      20           0 :   SubscriptionPageState createState() => SubscriptionPageState();
      21             : }
      22             : 
      23             : class SubscriptionPageState extends AbstractPageState<SubscriptionPage> {
      24           0 :   @override
      25             :   String getButtonName() => '';
      26             : 
      27           0 :   @override
      28             :   Widget buildButton(BuildContext context, BoxConstraints constraints) {
      29             :     return ThemeHelper.emptyBox;
      30             :   }
      31             : 
      32           0 :   @override
      33             :   Widget buildContent(BuildContext context, BoxConstraints constraints) {
      34           0 :     double indent = ThemeHelper.getIndent();
      35           0 :     NavigatorState nav = Navigator.of(context);
      36           0 :     return Padding(
      37           0 :       padding: EdgeInsets.fromLTRB(indent, indent, indent, 0),
      38           0 :       child: Column(
      39           0 :         children: [
      40           0 :           Text(AppLocale.labels.subscription),
      41             :           const Divider(),
      42           0 :           RowWidget(
      43             :             indent: indent,
      44           0 :             maxWidth: ThemeHelper.getWidth(context, 2, constraints),
      45             :             alignment: MainAxisAlignment.spaceBetween,
      46             :             chunk: const [null, null],
      47           0 :             children: [
      48           0 :               [
      49           0 :                 ElevatedButton(
      50           0 :                   onPressed: () => nav.pushNamed(AppRoute.aboutRoute, arguments: {'search': '0'}),
      51           0 :                   child: TextWrapper(AppLocale.labels.termPrivacy),
      52             :                 ),
      53             :               ],
      54           0 :               [
      55           0 :                 Align(
      56             :                   alignment: Alignment.centerRight,
      57           0 :                   child: ElevatedButton(
      58           0 :                     onPressed: () => nav.pushNamed(AppRoute.aboutRoute, arguments: {'search': '1'}),
      59           0 :                     child: TextWrapper(AppLocale.labels.termUse),
      60             :                   ),
      61             :                 ),
      62             :               ],
      63             :             ],
      64             :           ),
      65             :           const Divider(),
      66           0 :           Expanded(
      67           0 :             child: switch (defaultTargetPlatform) {
      68           0 :               TargetPlatform.iOS || TargetPlatform.macOS => const AppleWidget(),
      69           0 :               TargetPlatform.android => const GoogleWidget(),
      70             :               _ => const OtherWidget(),
      71             :             },
      72             :           ),
      73             :           ThemeHelper.hIndent,
      74             :         ],
      75             :       ),
      76             :     );
      77             :   }
      78             : 
      79           0 :   @override
      80             :   String getTitle() {
      81           0 :     return AppLocale.labels.subscriptionHeadline;
      82             :   }
      83             : }

Generated by: LCOV version 1.14