added intro screen api address selection. also added apk
This commit is contained in:
BIN
app-release.apk
BIN
app-release.apk
Binary file not shown.
@@ -98,5 +98,7 @@
|
||||
"sendagain": "Nochmal senden",
|
||||
"successful": "Erfolgreich",
|
||||
"back": "Zurück",
|
||||
"loading": "Lädt"
|
||||
"loading": "Lädt",
|
||||
"test": "Test",
|
||||
"notest": "Kein Test"
|
||||
}
|
||||
@@ -477,6 +477,16 @@
|
||||
"loading": "Loading",
|
||||
"@loading": {
|
||||
"description": "just Loading"
|
||||
},
|
||||
|
||||
"test": "Test",
|
||||
"@test": {
|
||||
"description": "test"
|
||||
},
|
||||
|
||||
"notest": "No Test",
|
||||
"@notest": {
|
||||
"description": "no test"
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
|
||||
|
||||
|
||||
|
||||
class IntroScreen extends StatefulWidget {
|
||||
const IntroScreen({super.key});
|
||||
|
||||
@@ -14,6 +17,8 @@ class _IntroScreenState extends State<IntroScreen> {
|
||||
TextEditingController bLandC = TextEditingController();
|
||||
TextEditingController apiAddress = TextEditingController();
|
||||
|
||||
String selectedApiAddress = "Test";
|
||||
|
||||
Future<void> _saveData() async {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
await prefs.setString('addresse1', addresse1C.text);
|
||||
@@ -143,10 +148,37 @@ class _IntroScreenState extends State<IntroScreen> {
|
||||
const SizedBox(
|
||||
height: 15,
|
||||
),
|
||||
TextField(
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: TextField(
|
||||
decoration: InputDecoration(
|
||||
hintText: AppLocalizations.of(context)!.apiaddress),
|
||||
controller: apiAddress,
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: PopupMenuButton(
|
||||
icon: const Icon(Icons.arrow_drop_down),
|
||||
initialValue: selectedApiAddress,
|
||||
onSelected: (value) {
|
||||
setState(() {
|
||||
selectedApiAddress = value;
|
||||
apiAddress.text = selectedApiAddress;
|
||||
});
|
||||
},
|
||||
itemBuilder: (context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
value: "http://192.168.1.106/www.dbb-wolf.de/data/app24.php",
|
||||
child: Text( AppLocalizations.of(context)!.test)),
|
||||
PopupMenuItem(
|
||||
value: "https://data.dbb-wolf.de/app24.php",
|
||||
child: Text( AppLocalizations.of(context)!.notest))
|
||||
],
|
||||
))
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user