Use the new valid CSV format from `quickget list_csv`
This commit is contained in:
parent
5788e1fa9e
commit
4cd8e168df
|
|
@ -18,7 +18,7 @@ void main() async {
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<OperatingSystem>> loadOperatingSystems(bool showUbuntus) 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 stdout = process.stdout as String;
|
||||||
var output = <OperatingSystem>[];
|
var output = <OperatingSystem>[];
|
||||||
|
|
||||||
|
|
@ -26,7 +26,7 @@ Future<List<OperatingSystem>> loadOperatingSystems(bool showUbuntus) async {
|
||||||
Version? currentVersion;
|
Version? currentVersion;
|
||||||
|
|
||||||
stdout.split('\n').skip(1).where((element) => element.isNotEmpty).map((e) => e.trim()).forEach((element) {
|
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) {
|
if (currentOperatingSystem?.code != supportedVersion.item2) {
|
||||||
currentOperatingSystem = OperatingSystem(supportedVersion.item1, supportedVersion.item2);
|
currentOperatingSystem = OperatingSystem(supportedVersion.item1, supportedVersion.item2);
|
||||||
output.add(currentOperatingSystem!);
|
output.add(currentOperatingSystem!);
|
||||||
|
|
|
||||||
|
|
@ -49,15 +49,9 @@ class MainPage extends StatelessWidget {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TextButton(
|
Text(
|
||||||
child: Text(
|
"Working directory : ${Directory.current.absolute.path}",
|
||||||
"Working directory : ${Directory.current.absolute.path}",
|
style: Theme.of(context).textTheme.subtitle1!.copyWith(color: Colors.white),
|
||||||
style: Theme.of(context)
|
|
||||||
.textTheme
|
|
||||||
.subtitle1!
|
|
||||||
.copyWith(color: Colors.white),
|
|
||||||
),
|
|
||||||
onPressed: () {},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue