Added null safety

This commit is contained in:
2025-08-05 14:47:44 +02:00
parent 91a21d1491
commit 68d4841b2d
6 changed files with 20 additions and 1 deletions

View File

@@ -17,11 +17,14 @@
"back": "Zurück",
"home": "Home",
"about": "Über",
"licenses": "Lizenzen",
"license_details": "Lizenzdetails",
"no_license_text": "Keine Lizenz verfügbar",
"imprint": "Impressum",
"empty_text_1": "Ganz schön leer hier...",
"empty_text_2": "Füge über den Button oben rechts eine neue Runde hinzu",
"delete_game_title": "Spiel löschen?",

View File

@@ -17,10 +17,13 @@
"back": "Back",
"home": "Home",
"about": "About",
"licenses": "Licenses",
"license_details": "License Details",
"imprint": "Imprint",
"no_license_text": "No license available",
"empty_text_1": "Pretty empty here...",

View File

@@ -206,6 +206,12 @@ abstract class AppLocalizations {
/// **'Lizenzdetails'**
String get license_details;
/// No description provided for @no_license_text.
///
/// In de, this message translates to:
/// **'Keine Lizenz verfügbar'**
String get no_license_text;
/// No description provided for @imprint.
///
/// In de, this message translates to:

View File

@@ -62,6 +62,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get license_details => 'Lizenzdetails';
@override
String get no_license_text => 'Keine Lizenz verfügbar';
@override
String get imprint => 'Impressum';

View File

@@ -62,6 +62,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get license_details => 'License Details';
@override
String get no_license_text => 'No license available';
@override
String get imprint => 'Imprint';

View File

@@ -37,7 +37,8 @@ class LicenseView extends StatelessWidget {
CupertinoPageRoute(
builder: (_) => LicenseDetailView(
title: ossLicenses[index].name,
license: ossLicenses[index].license!,
license: ossLicenses[index].license ??
AppLocalizations.of(context).no_license_text,
),
),
);