Started switching additionaldata to map

This commit is contained in:
Imran Remtulla
2022-12-19 19:34:43 -05:00
parent dbd6dec0a6
commit 1fe9e4f91e
19 changed files with 155 additions and 188 deletions

View File

@ -11,11 +11,8 @@ class SteamMobile extends AppSource {
name = tr('steam');
additionalSourceAppSpecificFormItems = [
[
GeneratedFormItem(
label: tr('app'),
key: 'app',
required: true,
opts: apks.entries.toList())
GeneratedFormItem('app',
label: tr('app'), required: true, opts: apks.entries.toList())
]
];
}
@ -32,15 +29,11 @@ class SteamMobile extends AppSource {
@override
Future<APKDetails> getLatestAPKDetails(
String standardUrl, List<String> additionalData,
String standardUrl, Map<String, String> additionalData,
{bool trackOnly = false}) async {
Response res = await get(Uri.parse('https://$host/mobile'));
if (res.statusCode == 200) {
var apkNamePrefix = findGeneratedFormValueByKey(
additionalSourceAppSpecificFormItems
.reduce((value, element) => [...value, ...element]),
additionalData,
'app');
var apkNamePrefix = additionalData['app'];
if (apkNamePrefix == null) {
throw NoReleasesError();
}