getVersions method Null safety
override
It's return all versions of the app.
It can help if you want to force user to update the app or notify user that there is an update on store.
Implementation
@override
Future<SettingModel> getVersions() async {
final response = await getData(path: 'setting/SupportedVersions');
final result = ApiReturnResult.fromJSON(response.data);
if (result.code == 200) {
return SettingModel.fromJson(result.data);
} else {
throw ExceptionApi(code: result.code, message: result.error?.first);
}
}