From 4cd8e168df3d67651565465a209a51a2e9bff579 Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Wed, 20 Oct 2021 02:02:20 +0200 Subject: [PATCH] Use the new valid CSV format from `quickget list_csv` --- lib/main.dart | 4 ++-- lib/src/pages/main_page.dart | 12 +++--------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index c9e2564..5c5a444 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,7 +18,7 @@ void main() async { } Future> 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 = []; @@ -26,7 +26,7 @@ Future> 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!); diff --git a/lib/src/pages/main_page.dart b/lib/src/pages/main_page.dart index 8820709..c906e43 100644 --- a/lib/src/pages/main_page.dart +++ b/lib/src/pages/main_page.dart @@ -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), ), ], ),