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

kevlatus / flutter_fortune_wheel / 20880454082

10 Jan 2026 03:28PM UTC coverage: 79.799% (-3.1%) from 82.904%
20880454082

push

github

kevlatus
Add BarIndicator and update FortuneBar to use it by default

- Introduced BarIndicator for improved visual representation.
- Updated FortuneBar to utilize BarIndicator instead of RectangleIndicator.
- Adjusted indicator sizing to be 80% of the smallest item width.
- Added tests for BarIndicator and FortuneBar default indicator behavior.

28 of 28 new or added lines in 2 files covered. (100.0%)

35 existing lines in 2 files now uncovered.

794 of 995 relevant lines covered (79.8%)

7.97 hits per line

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

0.0
/lib/src/indicators/rectangle_indicator.dart
1
part of 'indicators.dart';
2

3
class RectangleIndicator extends StatelessWidget {
4
  final double borderWidth;
5
  final Color? borderColor;
6
  final Color color;
7

UNCOV
8
  const RectangleIndicator({
×
9
    Key? key,
10
    this.borderWidth = 2,
11
    this.borderColor,
12
    this.color = Colors.transparent,
UNCOV
13
  }) : super(key: key);
×
14

UNCOV
15
  @override
×
16
  Widget build(BuildContext context) {
17
    final borderColor =
UNCOV
18
        this.borderColor ?? Theme.of(context).colorScheme.secondary;
×
19

UNCOV
20
    return LayoutBuilder(builder: (context, constraints) {
×
UNCOV
21
      final width = constraints.maxWidth;
×
UNCOV
22
      final height = constraints.maxHeight;
×
23

UNCOV
24
      return Stack(
×
UNCOV
25
        children: [
×
UNCOV
26
          Align(
×
27
            alignment: Alignment.center,
UNCOV
28
            child: _Rectangle(
×
29
              width: width,
30
              height: height,
31
              borderColor: borderColor,
UNCOV
32
              borderWidth: borderWidth,
×
UNCOV
33
              color: color,
×
34
            ),
35
          ),
UNCOV
36
          Align(
×
37
            alignment: Alignment.bottomCenter,
UNCOV
38
            child: SizedBox(
×
UNCOV
39
              width: width / 2,
×
UNCOV
40
              height: height / 10,
×
UNCOV
41
              child: _Triangle(
×
42
                color: borderColor,
43
              ),
44
            ),
45
          ),
UNCOV
46
          Align(
×
47
            alignment: Alignment.topCenter,
UNCOV
48
            child: Transform.rotate(
×
49
              angle: _math.pi,
UNCOV
50
              child: SizedBox(
×
UNCOV
51
                width: width / 2,
×
UNCOV
52
                height: height / 10,
×
UNCOV
53
                child: _Triangle(
×
54
                  color: borderColor,
55
                ),
56
              ),
57
            ),
58
          ),
59
        ],
60
      );
61
    });
62
  }
63
}
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