Skip to content

Commit 00da44e

Browse files
committed
fix it
1 parent e98dce2 commit 00da44e

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
android:theme="@style/LaunchTheme"
1111
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1212
android:hardwareAccelerated="true"
13-
android:windowSoftInputMode="adjustResize">
13+
android:windowSoftInputMode="adjustResize"
14+
android:allowBackup="false"
15+
android:fullBackupContent="false">
1416
<!-- Specifies an Android theme to apply to this Activity as soon as
1517
the Android process has started. This theme is visible to the user
1618
while the Flutter UI initializes. After that, this theme continues

lib/core/service/time_table.service.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ class TimeTableService with ChangeNotifier {
159159

160160
Future<String> getSchool() async {
161161
final prefs = await SharedPreferences.getInstance();
162+
final school = prefs.getString("school");
163+
164+
if (school == null || school.isEmpty) {
165+
return "bbs1-mainz";
166+
}
162167
return prefs.getString("school") ?? "bbs1-mainz";
163168
}
164169

lib/ui/screens/login/login.screen.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class LoginScreen extends ConsumerStatefulWidget {
1515
class _LoginScreenState extends ConsumerState<LoginScreen> {
1616
final usernameController = TextEditingController();
1717
final passwordController = TextEditingController();
18-
final schoolController = TextEditingController();
18+
final schoolController = TextEditingController(text: "bbs1-mainz");
1919
final passwordFocusNode = FocusNode();
2020
final schoolFocusNode = FocusNode();
2121

@@ -33,11 +33,11 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
3333
Future<void> getUserDataFromStorage() async {
3434
final username = await ref.read(timeTableService).getUserName();
3535
final password = await ref.read(timeTableService).getPassword();
36-
final school = await ref.read(timeTableService).getSchool();
36+
const school = "bbs1-mainz";
3737

3838
usernameController.text = username;
3939
passwordController.text = password;
40-
schoolController.text = school;
40+
schoolController.text = "bbs1-mainz";
4141

4242
if (username.isNotEmpty && password.isNotEmpty && school.isNotEmpty) {
4343
ref.read(timeTableService).login(

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
flutter:
1616
sdk: flutter
1717
flutter_search_bar: ^3.0.0-dev.1
18-
flutter_secure_storage: ^5.0.2
18+
flutter_secure_storage: 4.2.1
1919
flutter_staggered_animations: ^1.0.0
2020
fluttericon: ^2.0.0
2121
google_fonts: 2.2.0

windows/flutter/generated_plugin_registrant.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,9 @@
66

77
#include "generated_plugin_registrant.h"
88

9-
#include <flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
109
#include <url_launcher_windows/url_launcher_windows.h>
1110

1211
void RegisterPlugins(flutter::PluginRegistry* registry) {
13-
FlutterSecureStorageWindowsPluginRegisterWithRegistrar(
14-
registry->GetRegistrarForPlugin("FlutterSecureStorageWindowsPlugin"));
1512
UrlLauncherWindowsRegisterWithRegistrar(
1613
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
1714
}

windows/flutter/generated_plugins.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
#
44

55
list(APPEND FLUTTER_PLUGIN_LIST
6-
flutter_secure_storage_windows
76
url_launcher_windows
87
)
98

0 commit comments

Comments
 (0)