Improved by resolving the last two fixme
This commit is contained in:
@@ -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