diff --git a/app-release.apk b/app-release.apk index 6f35b8a..f94c6b9 100644 Binary files a/app-release.apk and b/app-release.apk differ diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index efe1024..fe09b0d 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -98,5 +98,7 @@ "sendagain": "Nochmal senden", "successful": "Erfolgreich", "back": "Zurück", - "loading": "Lädt" + "loading": "Lädt", + "test": "Test", + "notest": "Kein Test" } \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 01defac..b8795fa 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -477,6 +477,16 @@ "loading": "Loading", "@loading": { "description": "just Loading" + }, + + "test": "Test", + "@test": { + "description": "test" + }, + + "notest": "No Test", + "@notest": { + "description": "no test" } } \ No newline at end of file diff --git a/lib/other/intro_screen.dart b/lib/other/intro_screen.dart index ac6b308..9f3e6e2 100644 --- a/lib/other/intro_screen.dart +++ b/lib/other/intro_screen.dart @@ -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 { TextEditingController bLandC = TextEditingController(); TextEditingController apiAddress = TextEditingController(); + String selectedApiAddress = "Test"; + Future _saveData() async { SharedPreferences prefs = await SharedPreferences.getInstance(); await prefs.setString('addresse1', addresse1C.text); @@ -143,10 +148,37 @@ class _IntroScreenState extends State { const SizedBox( height: 15, ), - TextField( - decoration: InputDecoration( - hintText: AppLocalizations.of(context)!.apiaddress), - controller: apiAddress, + 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) => [ + 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)) + ], + )) + ], ) ], ),