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

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

Loading…
Cancel
Save