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

Floating-Dartists / matomo-tracker / 6454971306

09 Oct 2023 09:47AM UTC coverage: 93.108%. First build
6454971306

Pull #122

github

web-flow
Merge 529900ea8 into eec76315c
Pull Request #122: Bump package_info_plus from 4.1.0 to 5.0.0

743 of 798 relevant lines covered (93.11%)

2.87 hits per line

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

90.48
/lib/src/traceable_widget.dart
1
import 'package:flutter/material.dart';
2

3
import 'package:matomo_tracker/matomo_tracker.dart';
4

5
/// Wrapper around [TraceableClientMixin] to easily track a [child] widget.
6
class TraceableWidget extends StatefulWidget {
7
  const TraceableWidget({
1✔
8
    super.key,
9
    required this.child,
10
    this.actionName,
11
    this.pvId,
12
    this.updatePvIdAfterPop,
13
    this.path,
14
    this.dimensions,
15
    this.campaign,
16
    this.tracker,
17
    this.performanceInfo,
18
  });
19

20
  /// {@macro traceableClientMixin.actionName}
21
  final String? actionName;
22

23
  /// {@macro traceableClientMixin.pvId}
24
  final String? pvId;
25

26
  /// {@macro traceableClientMixin.updatePvIdAfterPop}
27
  final bool? updatePvIdAfterPop;
28

29
  /// {@macro traceableClientMixin.path}
30
  final String? path;
31

32
  /// {@macro traceableClientMixin.campaign}
33
  final Campaign? campaign;
34

35
  /// {@macro traceableClientMixin.dimensions}
36
  final Map<String, String>? dimensions;
37

38
  /// {@macro traceableClientMixin.performanceInfo}
39
  final PerformanceInfo? performanceInfo;
40

41
  /// {@macro traceableClientMixin.tracker}
42
  final MatomoTracker? tracker;
43

44
  final Widget child;
45

46
  @override
1✔
47
  State<TraceableWidget> createState() => _TraceableWidgetState();
1✔
48
}
49

50
class _TraceableWidgetState extends State<TraceableWidget>
51
    with TraceableClientMixin {
52
  @override
1✔
53
  Widget build(BuildContext context) {
54
    return widget.child;
2✔
55
  }
56

57
  @override
1✔
58
  String get actionName => widget.actionName ?? super.actionName;
2✔
59

60
  @override
1✔
61
  String get pvId => widget.pvId ?? super.pvId;
3✔
62

63
  @override
×
64
  bool get updatePvIdAfterPop =>
65
      widget.updatePvIdAfterPop ?? super.updatePvIdAfterPop;
×
66

67
  @override
1✔
68
  String? get path => widget.path;
2✔
69

70
  @override
1✔
71
  Campaign? get campaign => widget.campaign;
2✔
72

73
  @override
1✔
74
  Map<String, String>? get dimensions => widget.dimensions;
2✔
75

76
  @override
1✔
77
  PerformanceInfo? get performanceInfo => widget.performanceInfo;
2✔
78

79
  @override
1✔
80
  MatomoTracker get tracker => widget.tracker ?? super.tracker;
3✔
81
}
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

© 2025 Coveralls, Inc