LCOV - code coverage report
Current view: top level - lib/_classes/herald - app_start_of_week.dart Coverage Total Hit
Test: lcov.info Lines: 28.6 % 7 2
Test Date: 2026-11-14 15:08:11 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/storage/app_preferences.dart';
       5              : import 'package:material_ui/material_ui.dart';
       6              : 
       7              : class AppStartOfWeek extends ValueNotifier<int> {
       8              :   static const MONDAY = '1';
       9              :   static const SATURDAY = '6';
      10              :   static const SUNDAY = '0';
      11              : 
      12            3 :   static get state => int.tryParse(AppPreferences.get(AppPreferences.prefWeekStartDay) ?? '') ?? 1;
      13              : 
      14            3 :   AppStartOfWeek() : super(state);
      15              : 
      16            0 :   Future<void> set(int newValue) async {
      17            0 :     if (newValue != value) {
      18            0 :       value = newValue;
      19            0 :       await AppPreferences.set(AppPreferences.prefWeekStartDay, value.toString());
      20            0 :       notifyListeners();
      21              :     }
      22              :   }
      23              : }
        

Generated by: LCOV version 2.0-1