From 45391fb3cbc5acee3c628c4935ac61c70e88aed6 Mon Sep 17 00:00:00 2001 From: Amy Date: Sat, 5 Feb 2022 18:26:44 +0100 Subject: [PATCH] finished keyboard layouts --- lib/Keymaps/keymaps.dart | 99 +++++++++++++++++++++++++++- lib/Locales/locales.dart | 3 + lib/functions/keyboard.dart | 59 +++++++++++++++-- lib/functions/keymap/layout.dart | 25 +++++++ lib/functions/keymap/variant.dart | 43 ++++++++++++ lib/functions/location/location.dart | 52 ++++++++------- lib/functions/location/region.dart | 36 +++++----- lib/main.dart | 9 ++- 8 files changed, 279 insertions(+), 47 deletions(-) create mode 100644 lib/functions/keymap/layout.dart create mode 100644 lib/functions/keymap/variant.dart diff --git a/lib/Keymaps/keymaps.dart b/lib/Keymaps/keymaps.dart index 3f3a484..0caafd4 100644 --- a/lib/Keymaps/keymaps.dart +++ b/lib/Keymaps/keymaps.dart @@ -6,6 +6,7 @@ List keymaps = [ layout: "Afghanistan", backLayout: "Af", variant: [ + "normal", "fa-olpc", "olpc-ps", "ps", @@ -17,6 +18,7 @@ List keymaps = [ layout: "Albania", backLayout: "al", variant: [ + "normal", "plisi", "veqilharxhi", ], @@ -25,6 +27,7 @@ List keymaps = [ layout: "Armenia", backLayout: "am", variant: [ + "normal", "eastern", "eastern-alt", "phonetic", @@ -36,6 +39,7 @@ List keymaps = [ layout: "Arabic", backLayout: "ara", variant: [ + "normal", "azerty", "azerty_digits", "buckwalter", @@ -50,6 +54,7 @@ List keymaps = [ layout: "Austria", backLayout: "at", variant: [ + "normal", "mac", "nodeadkeyrs", ], @@ -58,6 +63,7 @@ List keymaps = [ layout: "Australia", backLayout: "au", variant: [ + "normal", "", ], ), @@ -65,6 +71,7 @@ List keymaps = [ layout: "Azerbaijan", backLayout: "az", variant: [ + "normal", "cyrillic", ], ), @@ -72,6 +79,7 @@ List keymaps = [ layout: "Bosnia and Herzegovina", backLayout: "ba", variant: [ + "normal", "alternatequotes", "unicode", "unicodeus", @@ -82,6 +90,7 @@ List keymaps = [ layout: "Bangladesh", backLayout: "bd", variant: [ + "normal", "probhat", ], ), @@ -89,6 +98,7 @@ List keymaps = [ layout: "Belgium", backLayout: "be", variant: [ + "normal", "iso-alternate", "nodeadkeys", "oss", @@ -100,6 +110,7 @@ List keymaps = [ layout: "Bulgaria", backLayout: "bg", variant: [ + "normal", "bas_phonetic", "bekl", "phonetic", @@ -109,6 +120,7 @@ List keymaps = [ layout: "Brazil", backLayout: "br", variant: [ + "normal", "dvorak", "nativo", "nativo-epo", @@ -121,6 +133,7 @@ List keymaps = [ layout: "Bhutan", backLayout: "bt", variant: [ + "normal", "latin", ], ), @@ -128,6 +141,7 @@ List keymaps = [ layout: "Botswana", backLayout: "bw", variant: [ + "normal", "", ], ), @@ -135,6 +149,7 @@ List keymaps = [ layout: "Belarus", backLayout: "by", variant: [ + "normal", "intl", "latin", "legacy", @@ -145,6 +160,7 @@ List keymaps = [ layout: "Canada", backLayout: "ca", variant: [ + "normal", "eng", "fr-dvorak", "fr-legacy", @@ -158,6 +174,7 @@ List keymaps = [ layout: "Democratic Republic of Congo", backLayout: "cd", variant: [ + "normal", "", ], ), @@ -165,6 +182,7 @@ List keymaps = [ layout: "Switzerland", backLayout: "ch", variant: [ + "normal", "de_mac", "de_nodeadkeys", "fr", @@ -177,6 +195,7 @@ List keymaps = [ layout: "Cameroon", backLayout: "cm", variant: [ + "normal", "azerty", "dvorak", "french", @@ -188,6 +207,7 @@ List keymaps = [ layout: "China", backLayout: "cn", variant: [ + "normal", "altgr-pinyin", "mon_manchu_galik", "mon_todo_galik", @@ -205,6 +225,7 @@ List keymaps = [ layout: "Czechia", backLayout: "cz", variant: [ + "normal", "bksl", "dvorak-ucw", "qwerty", @@ -218,6 +239,7 @@ List keymaps = [ layout: "Germany", backLayout: "de", variant: [ + "normal", "T3", "deadacute", "deadgraveacute", @@ -243,6 +265,7 @@ List keymaps = [ layout: "Denmark", backLayout: "dk", variant: [ + "normal", "dvorak", "mac", "mac_nodeadkeys", @@ -254,6 +277,7 @@ List keymaps = [ layout: "Algeria", backLayout: "dz", variant: [ + "normal", "ar", "azerty-deadkeys", "ber", @@ -265,6 +289,7 @@ List keymaps = [ layout: "Estonia", backLayout: "ee", variant: [ + "normal", "dvorak", "nodeadkeys", "us", @@ -274,6 +299,7 @@ List keymaps = [ layout: "Spain", backLayout: "es", variant: [ + "normal", "ast", "cat", "deadtilde", @@ -287,14 +313,17 @@ List keymaps = [ layout: "Ethiopia", backLayout: "et", variant: [ + "normal", "", ], ), Keymap( - layout: "finland", + layout: "Finland", backLayout: "fi", variant: [ - "classic", + "normal", + "normal" + "classic", "mac", "nodeadkeys", "smi", @@ -305,6 +334,7 @@ List keymaps = [ layout: "Faroe Islands", backLayout: "fo", variant: [ + "normal", "nodeadkeys", ], ), @@ -312,6 +342,7 @@ List keymaps = [ layout: "France", backLayout: "fr", variant: [ + "normal", "afnor", "azerty", "bepo", @@ -335,6 +366,7 @@ List keymaps = [ layout: "Great Britian", backLayout: "gb", variant: [ + "normal", "colemak", "colemak_dh", "dvorak", @@ -350,6 +382,7 @@ List keymaps = [ layout: "Georgia", backLayout: "ge", variant: [ + "normal", "ergonomic", "mess", "os", @@ -360,6 +393,7 @@ List keymaps = [ layout: "Ghana", backLayout: "gh", variant: [ + "normal", "akan", "avn", "ewe", @@ -374,6 +408,7 @@ List keymaps = [ layout: "Guinea", backLayout: "gn", variant: [ + "normal", "", ], ), @@ -381,6 +416,7 @@ List keymaps = [ layout: "Greece", backLayout: "gr", variant: [ + "normal", "extended", "nodeadkeys", "polytonic", @@ -391,6 +427,7 @@ List keymaps = [ layout: "Croatia", backLayout: "hr", variant: [ + "normal", "alternatequotes", "unicode", "unicodeus", @@ -401,6 +438,7 @@ List keymaps = [ layout: "Hungary", backLayout: "hu", variant: [ + "normal", "101_qwerty_comma_dead", "101_qwerty_comma_nodead", "101_qwerty_dot_dead", @@ -426,6 +464,7 @@ List keymaps = [ layout: "Indonesia", backLayout: "id", variant: [ + "normal", "phoneticx", ], ), @@ -433,6 +472,7 @@ List keymaps = [ layout: "Ireland", backLayout: "ie", variant: [ + "normal", "CloGaelach", "UnicodeExpert", "ogam", @@ -443,6 +483,7 @@ List keymaps = [ layout: "Israel", backLayout: "il", variant: [ + "normal", "biblical", "lyx", "phonetic", @@ -452,6 +493,7 @@ List keymaps = [ layout: "India", backLayout: "in", variant: [ + "normal", "ben", "ben_baishakhi", "ben_bornona", @@ -496,6 +538,7 @@ List keymaps = [ layout: "Iraq", backLayout: "iq", variant: [ + "normal", "ku", "ku_alt", "ku_ara", @@ -506,6 +549,7 @@ List keymaps = [ layout: "Iran", backLayout: "ir", variant: [ + "normal", "ku", "ku_alt", "ku_ara", @@ -517,6 +561,7 @@ List keymaps = [ layout: "Iceland", backLayout: "is", variant: [ + "normal", "ku", "ku_alt", "ku_ara", @@ -528,6 +573,7 @@ List keymaps = [ layout: "Italy", backLayout: "it", variant: [ + "normal", "fur", "geo", "ibm", @@ -543,6 +589,7 @@ List keymaps = [ layout: "Japan", backLayout: "jp", variant: [ + "normal", "OADG109A", "dvorak", "kana", @@ -554,6 +601,7 @@ List keymaps = [ layout: "Kenya", backLayout: "ke", variant: [ + "normal", "kik", ], ), @@ -561,6 +609,7 @@ List keymaps = [ layout: "Kyrgyzstan", backLayout: "kg", variant: [ + "normal", "phonetic", ], ), @@ -568,6 +617,7 @@ List keymaps = [ layout: "Cambodia", backLayout: "kh", variant: [ + "normal", "", ], ), @@ -575,6 +625,7 @@ List keymaps = [ layout: "The Republic of Korea", backLayout: "kr", variant: [ + "normal", "kr104", ], ), @@ -582,6 +633,7 @@ List keymaps = [ layout: "Kazakhstan", backLayout: "kz", variant: [ + "normal", "ext", "kazrus", "latin", @@ -592,6 +644,7 @@ List keymaps = [ layout: "Laos", backLayout: "la", variant: [ + "normal", "stea", ], ), @@ -599,6 +652,7 @@ List keymaps = [ layout: "Sri Lanka", backLayout: "lk", variant: [ + "normal", "tam_TAB", "tam_unicode", "us", @@ -608,6 +662,7 @@ List keymaps = [ layout: "Lithuania", backLayout: "lt", variant: [ + "normal", "ibm", "lekp", "lekpa", @@ -621,6 +676,7 @@ List keymaps = [ layout: "Lativa", backLayout: "lv", variant: [ + "normal", "adapted", "apostrophe", "ergonomic", @@ -633,6 +689,7 @@ List keymaps = [ layout: "Morocco", backLayout: "ma", variant: [ + "normal", "french", "tifinagh", "tifinagh-alt", @@ -646,6 +703,7 @@ List keymaps = [ layout: "Moldova", backLayout: "md", variant: [ + "normal", "gag", ], ), @@ -653,6 +711,7 @@ List keymaps = [ layout: "Montenegro", backLayout: "me", variant: [ + "normal", "cyrillic", "cyrillicalternatequotes", "cyrillicyz", @@ -666,6 +725,7 @@ List keymaps = [ layout: "Republic of North Macedonia", backLayout: "mk", variant: [ + "normal", "nodeadkeys", ], ), @@ -673,6 +733,7 @@ List keymaps = [ layout: "Mali", backLayout: "ml", variant: [ + "normal", "fr-oss", "us-intl", "us-mac", @@ -682,6 +743,7 @@ List keymaps = [ layout: "Myanmar", backLayout: "mm", variant: [ + "normal", "zawgyi", ], ), @@ -689,6 +751,7 @@ List keymaps = [ layout: "Mongolia", backLayout: "mn", variant: [ + "normal", "", ], ), @@ -696,6 +759,7 @@ List keymaps = [ layout: "Malta", backLayout: "mt", variant: [ + "normal", "alt-gb", "alt-us", "us", @@ -705,6 +769,7 @@ List keymaps = [ layout: "Maldives", backLayout: "mv", variant: [ + "normal", "", ], ), @@ -712,6 +777,7 @@ List keymaps = [ layout: "Malaysia", backLayout: "my", variant: [ + "normal", "phonetic", ], ), @@ -719,6 +785,7 @@ List keymaps = [ layout: "Nigeria", backLayout: "ng", variant: [ + "normal", "hausa", "igbo", "yoruba", @@ -728,6 +795,7 @@ List keymaps = [ layout: "Netherlands", backLayout: "nl", variant: [ + "normal", "mac", "std", "us", @@ -737,6 +805,7 @@ List keymaps = [ layout: "Norway", backLayout: "no", variant: [ + "normal", "colemak", "dvorak", "mac", @@ -751,6 +820,7 @@ List keymaps = [ layout: "Nepal", backLayout: "np", variant: [ + "normal", "", ], ), @@ -758,6 +828,7 @@ List keymaps = [ layout: "Philippines", backLayout: "ph", variant: [ + "normal", "capewell-dvorak", "capewell-dvorak-bay", "capewell-qwerf2k6", @@ -773,6 +844,7 @@ List keymaps = [ layout: "Pakistan", backLayout: "pk", variant: [ + "normal", "ara", "snd", "urd-crulp", @@ -783,6 +855,7 @@ List keymaps = [ layout: "Poland", backLayout: "pl", variant: [ + "normal", "csb", "dvorak", "dvorak_altquotes", @@ -798,6 +871,7 @@ List keymaps = [ layout: "Portugal", backLayout: "pt", variant: [ + "normal", "mac", "mac_nodeadkeys", "nativo", @@ -810,6 +884,7 @@ List keymaps = [ layout: "Romania", backLayout: "ro", variant: [ + "normal", "std", "winkeys", ], @@ -818,6 +893,7 @@ List keymaps = [ layout: "Serbia", backLayout: "rs", variant: [ + "normal", "alternatequotes", "latin", "latinalternatequotes", @@ -832,6 +908,7 @@ List keymaps = [ layout: "Russia", backLayout: "ru", variant: [ + "normal", "bak", "chm", "cv", @@ -861,6 +938,7 @@ List keymaps = [ layout: "Sweden", backLayout: "se", variant: [ + "normal", "dvorak", "mac", "nodeadkeys", @@ -877,6 +955,7 @@ List keymaps = [ layout: "Slovenia", backLayout: "si", variant: [ + "normal", "alternatequotes", "us", ], @@ -885,6 +964,7 @@ List keymaps = [ layout: "Slovakia", backLayout: "sk", variant: [ + "normal", "bksl", "qwerty", "qwerty_bksl", @@ -894,6 +974,7 @@ List keymaps = [ layout: "Senegal", backLayout: "sn", variant: [ + "normal", "", ], ), @@ -901,6 +982,7 @@ List keymaps = [ layout: "Sierra Leone", backLayout: "sl", variant: [ + "normal", "", ], ), @@ -908,6 +990,7 @@ List keymaps = [ layout: "Syria", backLayout: "sy", variant: [ + "normal", "ku", "ku_alt", "ku_f", @@ -919,6 +1002,7 @@ List keymaps = [ layout: "Togo", backLayout: "tg", variant: [ + "normal", "", ], ), @@ -926,6 +1010,7 @@ List keymaps = [ layout: "Thailand", backLayout: "th", variant: [ + "normal", "pat", "tis", ], @@ -934,6 +1019,7 @@ List keymaps = [ layout: "Tajikistan", backLayout: "tj", variant: [ + "normal", "legacy", ], ), @@ -941,6 +1027,7 @@ List keymaps = [ layout: "Turkmenistan", backLayout: "tm", variant: [ + "normal", "alt", ], ), @@ -948,6 +1035,7 @@ List keymaps = [ layout: "Turkey", backLayout: "tr", variant: [ + "normal", "alt", "crh", "crh_alt", @@ -967,6 +1055,7 @@ List keymaps = [ layout: "Taiwan", backLayout: "tw", variant: [ + "normal", "indigenous", "saisiyat", ], @@ -975,6 +1064,7 @@ List keymaps = [ layout: "Tanzania", backLayout: "tz", variant: [ + "normal", "", ], ), @@ -982,6 +1072,7 @@ List keymaps = [ layout: "Ukraine", backLayout: "ua", variant: [ + "normal", "homophonic", "legacy", "phonetic", @@ -995,6 +1086,7 @@ List keymaps = [ layout: "United States of America", backLayout: "us", variant: [ + "normal", "alt-intl", "altgr-intl", "chr", @@ -1026,6 +1118,7 @@ List keymaps = [ layout: "Uzbekistan", backLayout: "uz", variant: [ + "normal", "latin", ], ), @@ -1033,6 +1126,7 @@ List keymaps = [ layout: "Vietnam", backLayout: "vn", variant: [ + "normal", "fr", "us", ], @@ -1041,6 +1135,7 @@ List keymaps = [ layout: "South Africa", backLayout: "za", variant: [ + "normal", "", ], ) diff --git a/lib/Locales/locales.dart b/lib/Locales/locales.dart index 497cb6c..845eddb 100644 --- a/lib/Locales/locales.dart +++ b/lib/Locales/locales.dart @@ -1,3 +1,5 @@ +import 'package:jade_gui/Locales/arctic.dart'; + import 'africa.dart'; import 'america.dart'; import 'antarctica.dart'; @@ -25,6 +27,7 @@ List locations = [ Local(africa, "Africa"), Local(america, "America"), Local(antarctica, "Antarctica"), + Local(arctic, "Arctic"), Local(asia, "Asia"), Local(atlantic, "Atlantic"), Local(australia, "Australia"), diff --git a/lib/functions/keyboard.dart b/lib/functions/keyboard.dart index a83b63b..db00148 100644 --- a/lib/functions/keyboard.dart +++ b/lib/functions/keyboard.dart @@ -1,8 +1,51 @@ import 'package:flutter/material.dart'; import 'package:jade_gui/Keymaps/keymaps.dart'; +import 'package:jade_gui/classes/keymap.dart'; +import 'package:jade_gui/functions/keymap/variant.dart'; -Widget keyboard(next) { +Keymap chosenLayout = Keymap(); + +String getChosenLayout() { + return chosenLayout.backLayout; +} + +Widget layoutOrVariant(showVariant, keymap, choseLayout, nextPage) { + if (choseLayout && keymap == chosenLayout) { + return variant(chosenLayout, nextPage); + } else { + return Container( + color: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(8), + child: ElevatedButton( + onPressed: () { + chosenLayout = keymap; + showVariant(); + }, + style: TextButton.styleFrom( + primary: Colors.white, + backgroundColor: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(10), + ), + child: Text( + keymap.layout, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + ), + ); + } +} + +Widget layoutTemplate(Keymap keymap, showVariant, choseLayout, nextPage) { return Container( + color: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(8), + child: layoutOrVariant(showVariant, keymap, choseLayout, nextPage)); +} + +Widget keyboard(nextPage, showVariant, choseLayout) { + return SingleChildScrollView( child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ @@ -13,9 +56,17 @@ Widget keyboard(next) { fontWeight: FontWeight.bold, color: Color.fromARGB(255, 169, 0, 255)), ), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [], + GridView.count( + primary: false, + padding: const EdgeInsets.all(20), + shrinkWrap: true, + crossAxisSpacing: 10, + mainAxisSpacing: 10, + crossAxisCount: 3, + children: keymaps + .map((keymap) => + layoutTemplate(keymap, showVariant, choseLayout, nextPage)) + .toList(), ), ], ), diff --git a/lib/functions/keymap/layout.dart b/lib/functions/keymap/layout.dart new file mode 100644 index 0000000..4123bca --- /dev/null +++ b/lib/functions/keymap/layout.dart @@ -0,0 +1,25 @@ +import 'package:flutter/material.dart'; + +Widget layout(keymap, chosenLayout, showVariant) { + return Container( + color: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(8), + child: ElevatedButton( + onPressed: () { + chosenLayout = keymap; + showVariant(); + }, + style: TextButton.styleFrom( + primary: Colors.white, + backgroundColor: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(10), + ), + child: Text( + keymap.layout, + style: const TextStyle( + fontWeight: FontWeight.bold, + ), + ), + ), + ); +} diff --git a/lib/functions/keymap/variant.dart b/lib/functions/keymap/variant.dart new file mode 100644 index 0000000..ab3ba49 --- /dev/null +++ b/lib/functions/keymap/variant.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; + +String chosenVariant = "none"; + +String getChosenVariant() { + return chosenVariant; +} + +Widget variantButton(variant, nextPage) { + return Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + ElevatedButton( + onPressed: () { + chosenVariant = variant; + nextPage(); + }, + child: Text(variant), + style: TextButton.styleFrom( + primary: Colors.white, + backgroundColor: const Color.fromARGB(100, 169, 0, 255), + ), + ), + const SizedBox(height: 10), + ], + ); +} + +Widget variant(keymap, nextPage) { + return Container( + padding: const EdgeInsets.all(8), + color: const Color.fromARGB(100, 169, 0, 255), + child: SingleChildScrollView( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + crossAxisAlignment: CrossAxisAlignment.stretch, + children: keymap.variant + .map((variant) => variantButton(variant, nextPage)) + .toList()), + ), + ); +} diff --git a/lib/functions/location/location.dart b/lib/functions/location/location.dart index fa98a77..53b9acc 100644 --- a/lib/functions/location/location.dart +++ b/lib/functions/location/location.dart @@ -6,33 +6,37 @@ Location choosenLocPack = Location(); Widget locationTemplate(location, nextSlide) { return Container( padding: const EdgeInsets.all(8), - child: ElevatedButton( - onPressed: () { - nextSlide(); - choosenLocPack = location; - }, - style: TextButton.styleFrom( - primary: Colors.white, - backgroundColor: const Color.fromARGB(100, 169, 0, 255), - padding: const EdgeInsets.all(10), - ), - child: Column( - children: [ - Image( - image: AssetImage( - '${location.image}', + color: const Color.fromARGB(100, 169, 0, 255), + child: Container( + padding: const EdgeInsets.all(8), + color: const Color.fromARGB(100, 169, 0, 255), + child: ElevatedButton( + onPressed: () { + nextSlide(); + choosenLocPack = location; + }, + style: TextButton.styleFrom( + primary: Colors.white, + backgroundColor: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(10), + ), + child: Column( + children: [ + Image( + image: AssetImage( + '${location.image}', + ), + height: 300, + width: 300, ), - height: 300, - width: 300, - ), - Text(location.location, - style: const TextStyle( - fontWeight: FontWeight.bold, - )), - ], + Text(location.location, + style: const TextStyle( + fontWeight: FontWeight.bold, + )), + ], + ), ), ), - //color: Colors.teal[100], ); } diff --git a/lib/functions/location/region.dart b/lib/functions/location/region.dart index 43af0c4..b6fe720 100644 --- a/lib/functions/location/region.dart +++ b/lib/functions/location/region.dart @@ -5,24 +5,28 @@ String selectedRegion = ""; Widget locationTemplate(next, location) { return Container( padding: const EdgeInsets.all(8), - child: ElevatedButton( - onPressed: () { - next(); - selectedRegion = location.name; - }, - style: TextButton.styleFrom( - primary: Colors.white, - backgroundColor: const Color.fromARGB(100, 169, 0, 255), - padding: const EdgeInsets.all(10), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text(location.name), - ], + color: const Color.fromARGB(100, 169, 0, 255), + child: Container( + padding: const EdgeInsets.all(8), + color: const Color.fromARGB(100, 169, 0, 255), + child: ElevatedButton( + onPressed: () { + next(); + selectedRegion = location.name; + }, + style: TextButton.styleFrom( + primary: Colors.white, + backgroundColor: const Color.fromARGB(100, 169, 0, 255), + padding: const EdgeInsets.all(10), + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(location.name), + ], + ), ), ), - //color: Color.fromARGB(255, 83, 83, 83), ); } diff --git a/lib/main.dart b/lib/main.dart index f933f3d..7d929e8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -3,6 +3,7 @@ import 'package:jade_gui/functions/location/location.dart'; import 'package:jade_gui/functions/welcome.dart'; import 'package:jade_gui/functions/locale.dart'; import 'package:jade_gui/functions/keyboard.dart'; +import 'package:jade_gui/functions/keymap/variant.dart'; void main() => runApp( const MaterialApp( @@ -21,6 +22,7 @@ class Jadegui extends StatefulWidget { class _JadeguiState extends State { int _selectedIndex = 0; bool nextpage = false; + bool choseLayout = false; void nextslide() { setState(() { _selectedIndex = _selectedIndex + 1; @@ -262,9 +264,14 @@ class _JadeguiState extends State { setState(() { _selectedIndex = _selectedIndex + 1; }); - }); + }, () { + setState(() { + choseLayout = true; + }); + }, choseLayout); break; case 3: + print("${getChosenLayout()} - ${getChosenVariant()}"); widget = const Text( 'Showing Timezone screen', style: TextStyle(