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

icapps / flutter-icapps-architecture / 9346758135

03 Jun 2024 08:22AM CUT coverage: 93.711% (-1.4%) from 95.135%
9346758135

push

github

web-flow
Merge pull request #126 from icapps/feature/hover-color

Feature/hover color

38 of 53 new or added lines in 2 files covered. (71.7%)

894 of 954 relevant lines covered (93.71%)

1.57 hits per line

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

100.0
/lib/src/extension/null_extensions.dart
1
/// Extensions for nullable types
2
extension NullExtension2<T> on T? {
3
  /// Execute the given lambda and return a result
4
  ///
5
  /// ```dart
6
  /// someNullableInt.let((notNull) => notNull * 2) ?? 0;
7
  /// ```
8
  R? let<R>(R? Function(T) lambda) {
3✔
9
    final copy = this;
10
    if (copy == null) return null;
11
    return lambda(copy);
3✔
12
  }
13
}
14

15
extension NullStringExtension<T> on String? {
16
  /// Will return if the string is null or empty
17
  bool get isNullOrEmpty => this == null || this?.isEmpty == true;
3✔
18

19
  /// Will return if the string is not null and not empty
20
  bool get isNotNullOrEmpty => !isNullOrEmpty;
2✔
21
}
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