diff --git a/jadeemu.sh b/jadeemu.sh new file mode 100755 index 0000000..08a0ce9 --- /dev/null +++ b/jadeemu.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash +echo "[LOG] doing thing" +sleep 0.1 +echo "[ERROR] failed doing thing" +sleep 1 +echo "[LOG]" +sleep 0.1 +echo "[ERROR]" +sleep 1 diff --git a/lib/functions/install.dart b/lib/functions/install.dart index 6a3269c..b602996 100644 --- a/lib/functions/install.dart +++ b/lib/functions/install.dart @@ -3,6 +3,12 @@ import 'package:jade_gui/classes/installPrefs.dart'; import 'package:jade_gui/classes/desktop.dart'; import 'package:jade_gui/classes/location.dart'; import 'dart:convert'; +import 'dart:io'; + +test(setOutput) async { + var process = await Process.start('./scripts/jadeemu.sh', []); + process.stdout.transform(utf8.decoder).forEach(setOutput); +} Widget install( Location locale, @@ -19,7 +25,10 @@ Widget install( String hostname, bool ipv6, bool enableTimeshift, + setOutput, + output, ) { + test(setOutput); installPrefs prefs = installPrefs( locale: locale, keymap: keymap, @@ -50,6 +59,12 @@ Widget install( const SizedBox( height: 20, ), + SingleChildScrollView( + child: Text(output, + style: const TextStyle( + color: Color.fromARGB(255, 169, 0, 255), + )), + ), ], ); } diff --git a/lib/main.dart b/lib/main.dart index 4c65f58..9e7bd2b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -60,6 +60,7 @@ class _JadeguiState extends State { String partitionInfo = ""; String _diskType = ""; String hostname = ""; + String output = ""; Desktop currDesktop = desktops[0]; Keymap chosenLayout = Keymap(); @@ -470,12 +471,18 @@ class _JadeguiState extends State { enableSudo, rootPass, currDesktop, - disks, + selectedDisk, isEfi, - "grub-efi", + isEfi ? "grub-efi" : "grub-legacy", hostname, ipv6, enableTimeshift, + (value) { + setState(() { + output = output + "\n" + value; + }); + }, + output, ); break; default: diff --git a/scripts/jadeemu.sh b/scripts/jadeemu.sh new file mode 100755 index 0000000..08a0ce9 --- /dev/null +++ b/scripts/jadeemu.sh @@ -0,0 +1,9 @@ +#!/usr/bin/bash +echo "[LOG] doing thing" +sleep 0.1 +echo "[ERROR] failed doing thing" +sleep 1 +echo "[LOG]" +sleep 0.1 +echo "[ERROR]" +sleep 1