8. User Experience

UX Metrics

Dutch Localization100 / 100
Error Message Quality50 / 100

8.1 Localization & Internationalization

Status: ⚠️Warning

Findings:

  • Single language support: Only Dutch (nl) locale is supported
  • Localization infrastructure exists: flutter_localizations and intl packages are included
  • Hardcoded Dutch strings: Error messages and UI text are hardcoded in Dutch throughout the codebase
  • No translation files: No .arb files or translation resources found
  • Locale set to Dutch: Intl.defaultLocale = "nl" hardcoded in main_prod.dart and main_staging.dart
  • Date/time formatting: Uses intl package for date formatting but only for Dutch locale
  • No language switching: No mechanism for users to change language
  • Mixed localization: Some content comes from backend (mobile content), some is hardcoded

Evidence:

  • lib/app_widget.dart lines 182-183: Only Dutch locale supported: supportedLocales: [const Locale('nl', '')]
  • lib/main_prod.dart line 9: Intl.defaultLocale = "nl" hardcoded
  • lib/main_staging.dart line 10: Intl.defaultLocale = "nl" hardcoded
  • lib/routes/login_route.dart: Error messages hardcoded in Dutch (e.g., 'Er ging iets mis', 'Controleer je gebruikersnaam en wachtwoord.')
  • lib/routes/login_route.dart line 308: Success message hardcoded: "Je bent nu ingelogd."
  • pubspec.yaml includes flutter_localizations and intl: ^0.19.0
  • lib/app_widget.dart lines 177-180: Localization delegates configured (GlobalMaterialLocalizations, GlobalWidgetsLocalizations, GlobalCupertinoLocalizations)
  • No .arb files or translation resources in project
  • Multiple files use intl package for date formatting
  • Backend content (mobile content) may support multiple languages, but app UI is Dutch-only

Risk Level: Medium Risk

Recommendation:

  • Immediate actions:
  • Extract all hardcoded strings to translation files
  • Create .arb files for Dutch (and future languages)
  • Use intl package properly with translation keys
  • Short-term:
  • Implement proper localization using Flutter's localization system
  • Add language switching capability if multi-language support is needed
  • Ensure all user-facing strings are internationalized
  • Document localization process and guidelines

8.2 Error Messages & User Feedback

Status: ⚠️Warning

Findings:

  • No centralized error handling: No centralized error handling helper function
  • Error messages hardcoded in Dutch: All error messages are in Dutch and not internationalized
  • Multiple feedback mechanisms: Uses another_flushbar (Flushbar) for notifications and AlertDialog for errors
  • Inconsistent error handling: Different routes implement inline error handling with different patterns
  • Generic error messages: Some error messages are generic and don't provide specific feedback
  • Error logging: Errors logged to Firebase Crashlytics for monitoring
  • No error recovery suggestions: Error messages don't provide actionable recovery steps
  • Network error handling: Basic handling for network connectivity issues in Dio interceptor
  • Form validation messages: Form validation messages hardcoded in Dutch
  • Backend error messages: Some routes display backend error messages directly to users

Evidence:

  • lib/routes/login_route.dart lines 323-330: Inline error handling with AlertDialog
    • Error message: "Er ging iets mis" (generic)
    • Error message: "Controleer je gebruikersnaam en wachtwoord." (specific but hardcoded)
  • lib/routes/login_route.dart line 308: Success message using Flushbar: "Je bent nu ingelogd." (hardcoded Dutch)
  • lib/routes/register_data_route.dart lines 265-282: Displays backend error messages directly to users
  • lib/routes/redeem_two_route.dart lines 165-169: Displays backend error messages directly to users
  • lib/singletons/dio_singleton.dart: Token refresh error handling (lines 121-124) only resets session, doesn't notify user
  • Error messages hardcoded in Dutch throughout codebase
  • No centralized error handling helper function
  • Uses another_flushbar package for notifications

Risk Level: Medium Risk

Recommendation:

  • Immediate actions:
  • Create centralized error handling helper function
  • Internationalize all error messages using localization system
  • Ensure consistent use of error handling across all routes
  • Add more specific error messages with actionable recovery steps
  • Short-term:
  • Standardize error message format and tone
  • Add error recovery suggestions where appropriate
  • Improve error messages to be more user-friendly and specific
  • Document error handling patterns and best practices
  • Sanitize backend error messages before displaying to users