mirror of
https://github.com/Auties00/Reboot-Launcher.git
synced 2026-01-13 11:12:23 +01:00
Final version
This commit is contained in:
@@ -53,6 +53,11 @@ class _InfoPageState extends RebootPageState<InfoPage> {
|
|||||||
Future<List<String>> _initQuery() async {
|
Future<List<String>> _initQuery() async {
|
||||||
var response = await http.get(Uri.parse("https://api.github.com/repos/Auties00/reboot_launcher/contents/documentation/$currentLocale"));
|
var response = await http.get(Uri.parse("https://api.github.com/repos/Auties00/reboot_launcher/contents/documentation/$currentLocale"));
|
||||||
List<String> results = jsonDecode(response.body)
|
List<String> results = jsonDecode(response.body)
|
||||||
|
.sort((first, second) {
|
||||||
|
var firstIndex = int.parse(first["name"][0]);
|
||||||
|
var secondIndex = int.parse(second["name"][0]);
|
||||||
|
return firstIndex > secondIndex ? 1 : firstIndex == secondIndex ? 0 : -1;
|
||||||
|
})
|
||||||
.map<String>((entry) => entry["download_url"] as String)
|
.map<String>((entry) => entry["download_url"] as String)
|
||||||
.toList();
|
.toList();
|
||||||
return _infoController.links = results;
|
return _infoController.links = results;
|
||||||
|
|||||||
Reference in New Issue
Block a user