Improved by resolving the last two fixme

This commit is contained in:
verboomp
2026-02-05 09:25:13 +01:00
parent cb5d0de5b2
commit bb4d7fbf68
4 changed files with 15 additions and 2 deletions

View File

@@ -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) {