• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

dan-chez / car_manager_ui / 21461107562

29 Jan 2026 12:43AM UTC coverage: 98.89% (-1.1%) from 100.0%
21461107562

Pull #104

github

dan-chez
Fix test
Pull Request #104: Update dependencies and CI Flutter version

1 of 1 new or added line in 1 file covered. (100.0%)

11 existing lines in 11 files now uncovered.

980 of 991 relevant lines covered (98.89%)

2.07 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/lib/src/components/cm_empty_list.dart
1
// Copyright 2024 Danchez
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15
import 'package:carmanager_ui/src/components/cm_rich_text.dart';
16
import 'package:carmanager_ui/src/constants/cm_dimens.dart';
17
import 'package:carmanager_ui/src/constants/string_constants.dart';
18
import 'package:carmanager_ui/src/constants/text_style_constants.dart';
19
import 'package:flutter/material.dart';
20
import 'package:flutter_svg/flutter_svg.dart';
21

22
/// The [CMEmptyList] class is designed to present a message with customizable
23
/// bold text positions and an image, commonly used to indicate an empty list state.
24
/// It integrates with [CMRichText] for text styling and supports the use of SVG images.
25
///
26
/// Example usage:
27
/// ```dart
28
/// final emptyState = CMEmptyList(
29
///   text: "No items|found",
30
///   boldPositions: [1],
31
///   imagePath: 'assets/empty.svg',
32
/// );
33
/// ```
34
class CMEmptyList extends StatelessWidget {
35
  final String text;
36
  final String textDivider;
37
  final List<int> boldPositions;
38
  final String? imagePath;
39

UNCOV
40
  const CMEmptyList({
×
41
    super.key,
42
    required this.text,
43
    required this.boldPositions,
44
    this.textDivider = StringConstants.textDivider,
45
    this.imagePath,
46
  });
47

48
  @override
1✔
49
  Widget build(BuildContext context) {
50
    final asset = imagePath ?? '';
1✔
51
    return Center(
1✔
52
      child: Column(
1✔
53
        mainAxisSize: MainAxisSize.min,
54
        children: [
1✔
55
          Visibility(
1✔
56
            visible: imagePath != null,
1✔
57
            child: Padding(
1✔
58
              padding: const EdgeInsets.only(bottom: CMDimens.d20),
59
              child: SvgPicture.asset(asset, height: CMDimens.d80),
1✔
60
            ),
61
          ),
62
          CMRichText(
1✔
63
            text: text,
1✔
64
            boldPositions: boldPositions,
1✔
65
            textDivider: textDivider,
1✔
66
            textStyle: kSubtitleTextStyle,
67
            boldFontWeight: FontWeight.w700,
68
          )()
1✔
69
        ],
70
      ),
71
    );
72
  }
73
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc