Improved by resolving the last two fixme
This commit is contained in:
@@ -144,5 +144,9 @@
|
||||
"pictureWidgetLabelEvaluation": "BEWERTUNG",
|
||||
"@pictureWidgetLabelEvaluation": {
|
||||
"description": "Picture widget label for evaluation"
|
||||
},
|
||||
"pictureWidgetNotFound": "Das Bild konnte nicht gefunden werden.",
|
||||
"@pictureWidgetNotFound": {
|
||||
"description": "Picture not found error message"
|
||||
}
|
||||
}
|
||||
@@ -285,6 +285,12 @@ abstract class AppLocalizations {
|
||||
/// In de, this message translates to:
|
||||
/// **'BEWERTUNG'**
|
||||
String get pictureWidgetLabelEvaluation;
|
||||
|
||||
/// Picture not found error message
|
||||
///
|
||||
/// In de, this message translates to:
|
||||
/// **'Das Bild konnte nicht gefunden werden.'**
|
||||
String get pictureWidgetNotFound;
|
||||
}
|
||||
|
||||
class _AppLocalizationsDelegate
|
||||
|
||||
@@ -111,4 +111,7 @@ class AppLocalizationsDe extends AppLocalizations {
|
||||
|
||||
@override
|
||||
String get pictureWidgetLabelEvaluation => 'BEWERTUNG';
|
||||
|
||||
@override
|
||||
String get pictureWidgetNotFound => 'Das Bild konnte nicht gefunden werden.';
|
||||
}
|
||||
|
||||
@@ -72,13 +72,13 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
if (snapshot.hasData) {
|
||||
CustomerDto? dto = snapshot.data;
|
||||
if (dto == null) {
|
||||
return GeneralErrorWidget(error: "FIXME"); // FIXME: set error text data not found
|
||||
return GeneralErrorWidget(error: AppLocalizations.of(context)!.customerWidgetNotFound);
|
||||
}
|
||||
_customerDto = dto;
|
||||
_selectedPicture ??= dto.pictures.firstWhere((p) => p.id == widget.pictureId);
|
||||
_selectedPicture ??= _customerDto.pictures.firstOrNull;
|
||||
if (_selectedPicture == null) {
|
||||
return GeneralErrorWidget(error: "FIXME"); // FIXME: set error text data not found
|
||||
return GeneralErrorWidget(error: AppLocalizations.of(context)!.pictureWidgetNotFound);
|
||||
}
|
||||
return _body(context, _selectedPicture!);
|
||||
} else if (snapshot.hasError) {
|
||||
|
||||
Reference in New Issue
Block a user