make the selected location options actually readable by the rest of the program

pull/2/head
Amy 3 years ago
parent 0e7ef87a59
commit bef7ac14d5
No known key found for this signature in database
GPG Key ID: C642EA4B2F4096BE

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

@ -1,12 +1,15 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../Locales/locales.dart'; import '../Locales/locales.dart';
import '../classes/location.dart';
Location choosenLocPack = Location();
Widget locationTemplate(location, nextSlide) { Widget locationTemplate(location, nextSlide) {
return Container( return Container(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(8),
child: ElevatedButton( child: ElevatedButton(
onPressed: () { onPressed: () {
nextSlide(); nextSlide();
choosenLocPack = location;
}, },
child: Column( child: Column(
children: [ children: [
@ -205,3 +208,7 @@ List<Widget> options(region, locations, nextSlide) {
// Finally returning a Widget // Finally returning a Widget
return widget; return widget;
} }
Location getSelectedLocPack() {
return choosenLocPack;
}

@ -1,7 +1,9 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:jade_gui/functions/Region.dart';
import 'package:jade_gui/functions/location.dart';
import 'functions/welcome.dart'; import 'functions/welcome.dart';
import 'functions/locale.dart'; import 'functions/locale.dart';
//import 'classes/location.dart'; import 'classes/location.dart';
//import 'Locales/locales.dart'; //import 'Locales/locales.dart';
void main() => runApp( void main() => runApp(
@ -255,6 +257,9 @@ class _JadeguiState extends State<Jadegui> {
}, nextpage); }, nextpage);
break; break;
case 2: case 2:
print(
"${getSelectedLocPack().region}/${getSelectedLocPack().location}");
print(getSelectedLocPack().locale);
widget = const Text( widget = const Text(
'Showing Keymap screen', 'Showing Keymap screen',
style: TextStyle( style: TextStyle(

Loading…
Cancel
Save