-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(#661): add new lab type and test backend
- Loading branch information
Showing
4 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import '../../common/module.dart'; | ||
import 'lab.dart'; | ||
|
||
class AppShareFlowLab extends Lab { | ||
AppShareFlowLab({ | ||
required super.name, | ||
required this.shareAppName, | ||
}); | ||
|
||
String shareAppName; | ||
late Uri publishUrl; | ||
late Map<String, String>? publishHeaders; | ||
|
||
@override | ||
Future<void> authenticate() async { | ||
// TODO: introduce static properties for loading message and whether loading | ||
// can be canceled (throws LabAuthenticationCanceled) | ||
// TODO: get query data from DWA via deeplink (Android-only suffient) | ||
// TODO: show error for iOS until implemented | ||
// THIS IS FOR TESTING, SHOULD GET FROM DWA | ||
publishUrl = Uri.parse( | ||
'https://hpi-datastore.duckdns.org/userdata?id=1e006a69-b693-43d2-a318-22904e305b5c', | ||
); | ||
publishHeaders = null; | ||
} | ||
|
||
@override | ||
Future<(List<LabResult>, List<String>)> loadData() async { | ||
return fetchData( | ||
publishUrl, | ||
headers: publishHeaders, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters