diff --git a/lib/functions/desktop.dart b/lib/functions/desktop.dart index 8da6dbc..e3996b0 100644 --- a/lib/functions/desktop.dart +++ b/lib/functions/desktop.dart @@ -68,17 +68,15 @@ Widget desktopView(currDesktop, setDesktop, next) { ), ], ), - child: Expanded( - child: SingleChildScrollView( - primary: false, - child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceEvenly, - //crossAxisAlignment: CrossAxisAlignment.stretch, - children: desktops - .map( - (desktop) => desktopTemplate(desktop, setDesktop)) - .toList(), - ), + child: SingleChildScrollView( + primary: false, + child: Column( + //mainAxisAlignment: MainAxisAlignment.spaceEvenly, + //crossAxisAlignment: CrossAxisAlignment.stretch, + children: desktops + .map( + (desktop) => desktopTemplate(desktop, setDesktop)) + .toList(), ), ), ), diff --git a/lib/functions/keyboard.dart b/lib/functions/keyboard.dart index 034e0a3..00eb81d 100644 --- a/lib/functions/keyboard.dart +++ b/lib/functions/keyboard.dart @@ -117,17 +117,15 @@ Widget keyboard( ), ], ), - child: Expanded( - child: SingleChildScrollView( - primary: false, - child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceEvenly, - //crossAxisAlignment: CrossAxisAlignment.stretch, - children: keymaps - .map((keymap) => - layoutTemplate(keymap, setChosenLayout)) - .toList(), - ), + child: SingleChildScrollView( + primary: false, + child: Column( + //mainAxisAlignment: MainAxisAlignment.spaceEvenly, + //crossAxisAlignment: CrossAxisAlignment.stretch, + children: keymaps + .map( + (keymap) => layoutTemplate(keymap, setChosenLayout)) + .toList(), ), ), ), @@ -149,17 +147,15 @@ Widget keyboard( ), ], ), - child: Expanded( - child: SingleChildScrollView( - primary: false, - child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceEvenly, - //crossAxisAlignment: CrossAxisAlignment.stretch, - children: chosenLayout.variant - .map((map) => - variantTemplate(map, chosenLayout, nextPage)) - .toList(), - ), + child: SingleChildScrollView( + primary: false, + child: Column( + //mainAxisAlignment: MainAxisAlignment.spaceEvenly, + //crossAxisAlignment: CrossAxisAlignment.stretch, + children: chosenLayout.variant + .map((map) => + variantTemplate(map, chosenLayout, nextPage)) + .toList(), ), ), ), diff --git a/lib/functions/users.dart b/lib/functions/users.dart index 3096580..007aa2a 100644 --- a/lib/functions/users.dart +++ b/lib/functions/users.dart @@ -73,46 +73,169 @@ Widget users( ), ], ), - child: Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - const SizedBox(height: 10), - TextFormField( - autovalidateMode: AutovalidateMode.always, - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'Username', - labelStyle: TextStyle(color: Colors.white), - hintText: 'Enter your username', - iconColor: Colors.white, - focusColor: Color.fromARGB(100, 169, 0, 255), - hoverColor: Colors.blue, - prefixIconColor: Colors.white, - suffixIconColor: Colors.white, - ), - style: const TextStyle(color: Colors.white), - onChanged: (String? value) { - setUsername(value); - debugPrint(value); - debugPrint("Username: $username"); + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + const SizedBox(height: 10), + TextFormField( + autovalidateMode: AutovalidateMode.always, + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'Username', + labelStyle: TextStyle(color: Colors.white), + hintText: 'Enter your username', + iconColor: Colors.white, + focusColor: Color.fromARGB(100, 169, 0, 255), + hoverColor: Colors.blue, + prefixIconColor: Colors.white, + suffixIconColor: Colors.white, + ), + style: const TextStyle(color: Colors.white), + onChanged: (String? value) { + setUsername(value); + debugPrint(value); + debugPrint("Username: $username"); + }, + validator: (String? value) { + return (value != "" && + value != null && + !userRegex.hasMatch(value)) + ? 'Bad username, may not contain spaces, uppercase, or special characters' + : null; + }, + ), + const SizedBox(height: 10), + TextFormField( + //obscureText: true, + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'Password', + labelStyle: TextStyle(color: Colors.white), + hintText: 'Enter your password', + iconColor: Colors.white, + focusColor: Color.fromARGB(100, 169, 0, 255), + hoverColor: Colors.blue, + prefixIconColor: Colors.white, + suffixIconColor: Colors.white, + ), + style: const TextStyle( + color: Colors.white, + ), + onChanged: (String? value) { + setPass(value); + debugPrint(value); + debugPrint("Password: $password"); + debugPrint("Confirm: $confirmPassword"); + }, + ), + const SizedBox(height: 10), + TextFormField( + //obscureText: true, + autovalidateMode: AutovalidateMode.always, + decoration: const InputDecoration( + border: OutlineInputBorder(), + labelText: 'Repeat password', + labelStyle: TextStyle(color: Colors.white), + hintText: 'Repeat your password', + iconColor: Colors.white, + focusColor: Color.fromARGB(100, 169, 0, 255), + hoverColor: Colors.blue, + prefixIconColor: Colors.white, + suffixIconColor: Colors.white, + ), + style: const TextStyle( + color: Colors.white, + ), + onChanged: (String? value) { + setConfirmPass(value); + debugPrint(password); + debugPrint(confirmPassword); + debugPrint(value); + }, + validator: (String? value) { + debugPrint(value); + debugPrint("Password: $password"); + debugPrint("Confirm: $confirmPassword"); + return (value != password) + ? 'Password does not match' + : null; + }, + ), + const SizedBox(height: 10), + Container( + padding: const EdgeInsets.all(2), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all(color: Colors.black45), + color: const Color.fromARGB(100, 30, 30, 30), + ), + child: CheckboxListTile( + title: const Text('Enable sudo for user', + style: TextStyle(color: Colors.white)), + value: enableSudo, + onChanged: (bool? value) { + setState(value!); }, - validator: (String? value) { - return (value != "" && - value != null && - !userRegex.hasMatch(value)) - ? 'Bad username, may not contain spaces, uppercase, or special characters' - : null; + secondary: Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + padding: const EdgeInsets.fromLTRB(10, 10, 10, 13), + child: const Text( + '#', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), + ), + ), + const SizedBox(height: 10), + Container( + padding: const EdgeInsets.all(2), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(5), + border: Border.all(color: Colors.black45), + color: const Color.fromARGB(100, 30, 30, 30), + ), + child: CheckboxListTile( + title: const Text('Enable root user', + style: TextStyle(color: Colors.white)), + value: enableRoot, + onChanged: (bool? value) { + setRootUser(value!); }, + secondary: Container( + decoration: const BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + padding: const EdgeInsets.fromLTRB(10, 10, 10, 13), + child: const Text( + '#', + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.black, + ), + ), + ), ), - const SizedBox(height: 10), - TextFormField( + ), + Visibility( + child: const SizedBox(height: 10), visible: enableRoot), + Visibility( + visible: enableRoot, + child: TextFormField( //obscureText: true, decoration: const InputDecoration( border: OutlineInputBorder(), - labelText: 'Password', + labelText: 'Password for root user', labelStyle: TextStyle(color: Colors.white), - hintText: 'Enter your password', + hintText: 'Password for the root user', iconColor: Colors.white, focusColor: Color.fromARGB(100, 169, 0, 255), hoverColor: Colors.blue, @@ -123,21 +246,25 @@ Widget users( color: Colors.white, ), onChanged: (String? value) { - setPass(value); + setRootPass(value); debugPrint(value); - debugPrint("Password: $password"); - debugPrint("Confirm: $confirmPassword"); + debugPrint("Root Password: $rootPass"); + debugPrint("Root Confirm: $confirmRootPass"); }, ), - const SizedBox(height: 10), - TextFormField( + ), + Visibility( + child: const SizedBox(height: 10), visible: enableRoot), + Visibility( + visible: enableRoot, + child: TextFormField( //obscureText: true, autovalidateMode: AutovalidateMode.always, decoration: const InputDecoration( border: OutlineInputBorder(), - labelText: 'Repeat password', + labelText: 'Repeat root password', labelStyle: TextStyle(color: Colors.white), - hintText: 'Repeat your password', + hintText: 'Repeat root password', iconColor: Colors.white, focusColor: Color.fromARGB(100, 169, 0, 255), hoverColor: Colors.blue, @@ -148,154 +275,23 @@ Widget users( color: Colors.white, ), onChanged: (String? value) { - setConfirmPass(value); + setConfirmRootPass(value); debugPrint(password); debugPrint(confirmPassword); debugPrint(value); }, validator: (String? value) { debugPrint(value); - debugPrint("Password: $password"); - debugPrint("Confirm: $confirmPassword"); - return (value != password) + debugPrint("Root Password: $rootPass"); + debugPrint("Root Confirm: $confirmRootPass"); + return (value != rootPass) ? 'Password does not match' : null; }, ), - const SizedBox(height: 10), - Container( - padding: const EdgeInsets.all(2), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - border: Border.all(color: Colors.black45), - color: const Color.fromARGB(100, 30, 30, 30), - ), - child: CheckboxListTile( - title: const Text('Enable sudo for user', - style: TextStyle(color: Colors.white)), - value: enableSudo, - onChanged: (bool? value) { - setState(value!); - }, - secondary: Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.white, - ), - padding: const EdgeInsets.fromLTRB(10, 10, 10, 13), - child: const Text( - '#', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - ), - ), - ), - const SizedBox(height: 10), - Container( - padding: const EdgeInsets.all(2), - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(5), - border: Border.all(color: Colors.black45), - color: const Color.fromARGB(100, 30, 30, 30), - ), - child: CheckboxListTile( - title: const Text('Enable root user', - style: TextStyle(color: Colors.white)), - value: enableRoot, - onChanged: (bool? value) { - setRootUser(value!); - }, - secondary: Container( - decoration: const BoxDecoration( - shape: BoxShape.circle, - color: Colors.white, - ), - padding: const EdgeInsets.fromLTRB(10, 10, 10, 13), - child: const Text( - '#', - style: TextStyle( - fontSize: 20, - fontWeight: FontWeight.bold, - color: Colors.black, - ), - ), - ), - ), - ), - Visibility( - child: const SizedBox(height: 10), - visible: enableRoot), - Visibility( - visible: enableRoot, - child: TextFormField( - //obscureText: true, - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'Password for root user', - labelStyle: TextStyle(color: Colors.white), - hintText: 'Password for the root user', - iconColor: Colors.white, - focusColor: Color.fromARGB(100, 169, 0, 255), - hoverColor: Colors.blue, - prefixIconColor: Colors.white, - suffixIconColor: Colors.white, - ), - style: const TextStyle( - color: Colors.white, - ), - onChanged: (String? value) { - setRootPass(value); - debugPrint(value); - debugPrint("Root Password: $rootPass"); - debugPrint("Root Confirm: $confirmRootPass"); - }, - ), - ), - Visibility( - child: const SizedBox(height: 10), - visible: enableRoot), - Visibility( - visible: enableRoot, - child: TextFormField( - //obscureText: true, - autovalidateMode: AutovalidateMode.always, - decoration: const InputDecoration( - border: OutlineInputBorder(), - labelText: 'Repeat root password', - labelStyle: TextStyle(color: Colors.white), - hintText: 'Repeat root password', - iconColor: Colors.white, - focusColor: Color.fromARGB(100, 169, 0, 255), - hoverColor: Colors.blue, - prefixIconColor: Colors.white, - suffixIconColor: Colors.white, - ), - style: const TextStyle( - color: Colors.white, - ), - onChanged: (String? value) { - setConfirmRootPass(value); - debugPrint(password); - debugPrint(confirmPassword); - debugPrint(value); - }, - validator: (String? value) { - debugPrint(value); - debugPrint("Root Password: $rootPass"); - debugPrint("Root Confirm: $confirmRootPass"); - return (value != rootPass) - ? 'Password does not match' - : null; - }, - ), - ), - const SizedBox(height: 10), - ], - ), + ), + const SizedBox(height: 10), + ], ), ), ), diff --git a/lib/main.dart b/lib/main.dart index 8f8d61e..07cc933 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -370,7 +370,7 @@ class _JadeguiState extends State { }, ); break; - case 5: + /*case 5: print("Desktop: ${currDesktop.name}"); widget = const Text( 'Showing Desktop screen', @@ -380,8 +380,8 @@ class _JadeguiState extends State { color: Color.fromARGB(255, 169, 0, 255), ), ); - break; - case 6: + break;*/ + case 5: widget = const Text( 'Showing Misc screen', style: TextStyle( @@ -391,7 +391,7 @@ class _JadeguiState extends State { ), ); break; - case 7: + case 6: widget = const Text( 'Showing Partitioning screen', style: TextStyle( @@ -401,7 +401,7 @@ class _JadeguiState extends State { ), ); break; - case 8: + case 7: widget = const Text( 'Showing Summary screen', style: TextStyle( @@ -411,7 +411,7 @@ class _JadeguiState extends State { ), ); break; - case 9: + case 8: widget = const Text( 'Showing Installing screen', style: TextStyle( diff --git a/linux/flutter/generated_plugins.cmake b/linux/flutter/generated_plugins.cmake index 51436ae..2e1de87 100644 --- a/linux/flutter/generated_plugins.cmake +++ b/linux/flutter/generated_plugins.cmake @@ -5,6 +5,9 @@ list(APPEND FLUTTER_PLUGIN_LIST ) +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + set(PLUGIN_BUNDLED_LIBRARIES) foreach(plugin ${FLUTTER_PLUGIN_LIST}) @@ -13,3 +16,8 @@ foreach(plugin ${FLUTTER_PLUGIN_LIST}) list(APPEND PLUGIN_BUNDLED_LIBRARIES $) list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/pubspec.lock b/pubspec.lock index 306911b..f5d794a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -88,6 +88,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.12.11" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" meta: dependency: transitive description: @@ -101,7 +108,7 @@ packages: name: path url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" sky_engine: dependency: transitive description: flutter @@ -113,7 +120,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.1" + version: "1.8.2" stack_trace: dependency: transitive description: @@ -148,7 +155,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.3" + version: "0.4.9" typed_data: dependency: transitive description: @@ -162,6 +169,6 @@ packages: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.2" sdks: dart: ">=2.15.1 <3.0.0"