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

wger-project / flutter / 30854254088

03 Aug 2026 09:21PM UTC coverage: 40.895% (-15.0%) from 55.93%
30854254088

Pull #1260

github

web-flow
Merge d93794de5 into e3affdd4f
Pull Request #1260: WIP: health sync

9980 of 24404 relevant lines covered (40.89%)

1.72 hits per line

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

0.0
/lib/features/exercises/validators.dart
1
import 'package:flutter/material.dart';
2
import 'package:wger/l10n/generated/app_localizations.dart';
3

4
/// The amount of characters an exercise description needs to have
5
const MIN_CHARS_DESCRIPTION = 40;
6

7
/// The amount of characters an exercise name needs to have
8
const MIN_CHARS_NAME = 5;
9
const MAX_CHARS_NAME = 40;
10

11
String? validateName(String? name, BuildContext context) {
×
12
  if (name!.isEmpty) {
×
13
    return AppLocalizations.of(context).enterValue;
×
14
  }
15

16
  if (name.length < MIN_CHARS_NAME || name.length > MAX_CHARS_NAME) {
×
17
    return AppLocalizations.of(
×
18
      context,
19
    ).enterCharacters(MIN_CHARS_NAME.toString(), MAX_CHARS_NAME.toString());
×
20
  }
21

22
  return null;
23
}
24

25
String? validateAuthorName(String? name, BuildContext context) {
×
26
  if (name!.isEmpty) {
×
27
    return AppLocalizations.of(context).enterValue;
×
28
  }
29

30
  return null;
31
}
32

33
String? validateExerciseDescription(String? name, BuildContext context) {
×
34
  if (name!.isEmpty) {
×
35
    return AppLocalizations.of(context).enterValue;
×
36
  }
37

38
  if (name.length < MIN_CHARS_DESCRIPTION) {
×
39
    return AppLocalizations.of(context).enterMinCharacters(MIN_CHARS_DESCRIPTION.toString());
×
40
  }
41

42
  return null;
43
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc