getErrorTitle method
Implementation
String getErrorTitle(AppLocalizations appLocalizations) {
switch (status) {
case FetchedProductStatus.ok:
return 'Not supposed to happen...';
case FetchedProductStatus.userCancelled:
return 'Not supposed to happen either...';
case FetchedProductStatus.internetNotFound:
return appLocalizations.product_refresher_internet_not_found;
case FetchedProductStatus.internetError:
if (isConnected == false) {
return appLocalizations.product_refresher_internet_not_connected;
}
if (failedPingedHost != null) {
return appLocalizations.product_refresher_internet_no_ping(
failedPingedHost,
);
}
return appLocalizations.product_refresher_internet_no_ping(
exceptionString,
);
}
}