Use the new valid CSV format from `quickget list_csv`

This commit is contained in:
Yannick Mauray 2021-10-20 02:02:20 +02:00
parent 5788e1fa9e
commit 4cd8e168df
No known key found for this signature in database
GPG Key ID: 67C4AAC5E99CB909
2 changed files with 5 additions and 11 deletions

View File

@ -18,7 +18,7 @@ void main() async {
}
Future<List<OperatingSystem>> loadOperatingSystems(bool showUbuntus) async {
var process = await Process.run('quickget', ['list']);
var process = await Process.run('quickget', ['list_csv']);
var stdout = process.stdout as String;
var output = <OperatingSystem>[];
@ -26,7 +26,7 @@ Future<List<OperatingSystem>> loadOperatingSystems(bool showUbuntus) async {
Version? currentVersion;
stdout.split('\n').skip(1).where((element) => element.isNotEmpty).map((e) => e.trim()).forEach((element) {
var supportedVersion = Tuple5.fromList(element.split(","));
var supportedVersion = Tuple4.fromList(element.split(","));
if (currentOperatingSystem?.code != supportedVersion.item2) {
currentOperatingSystem = OperatingSystem(supportedVersion.item1, supportedVersion.item2);
output.add(currentOperatingSystem!);

View File

@ -49,15 +49,9 @@ class MainPage extends StatelessWidget {
),
],
),
TextButton(
child: Text(
"Working directory : ${Directory.current.absolute.path}",
style: Theme.of(context)
.textTheme
.subtitle1!
.copyWith(color: Colors.white),
),
onPressed: () {},
Text(
"Working directory : ${Directory.current.absolute.path}",
style: Theme.of(context).textTheme.subtitle1!.copyWith(color: Colors.white),
),
],
),