File tree Expand file tree Collapse file tree 6 files changed +12
-9
lines changed Expand file tree Collapse file tree 6 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 10
10
android : theme =" @style/LaunchTheme"
11
11
android : configChanges =" orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
12
12
android : hardwareAccelerated =" true"
13
- android : windowSoftInputMode =" adjustResize" >
13
+ android : windowSoftInputMode =" adjustResize"
14
+ android : allowBackup =" false"
15
+ android : fullBackupContent =" false" >
14
16
<!-- Specifies an Android theme to apply to this Activity as soon as
15
17
the Android process has started. This theme is visible to the user
16
18
while the Flutter UI initializes. After that, this theme continues
Original file line number Diff line number Diff line change @@ -159,6 +159,11 @@ class TimeTableService with ChangeNotifier {
159
159
160
160
Future <String > getSchool () async {
161
161
final prefs = await SharedPreferences .getInstance ();
162
+ final school = prefs.getString ("school" );
163
+
164
+ if (school == null || school.isEmpty) {
165
+ return "bbs1-mainz" ;
166
+ }
162
167
return prefs.getString ("school" ) ?? "bbs1-mainz" ;
163
168
}
164
169
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class LoginScreen extends ConsumerStatefulWidget {
15
15
class _LoginScreenState extends ConsumerState <LoginScreen > {
16
16
final usernameController = TextEditingController ();
17
17
final passwordController = TextEditingController ();
18
- final schoolController = TextEditingController ();
18
+ final schoolController = TextEditingController (text : "bbs1-mainz" );
19
19
final passwordFocusNode = FocusNode ();
20
20
final schoolFocusNode = FocusNode ();
21
21
@@ -33,11 +33,11 @@ class _LoginScreenState extends ConsumerState<LoginScreen> {
33
33
Future <void > getUserDataFromStorage () async {
34
34
final username = await ref.read (timeTableService).getUserName ();
35
35
final password = await ref.read (timeTableService).getPassword ();
36
- final school = await ref. read (timeTableService). getSchool () ;
36
+ const school = "bbs1-mainz" ;
37
37
38
38
usernameController.text = username;
39
39
passwordController.text = password;
40
- schoolController.text = school ;
40
+ schoolController.text = "bbs1-mainz" ;
41
41
42
42
if (username.isNotEmpty && password.isNotEmpty && school.isNotEmpty) {
43
43
ref.read (timeTableService).login (
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ dependencies:
15
15
flutter :
16
16
sdk : flutter
17
17
flutter_search_bar : ^3.0.0-dev.1
18
- flutter_secure_storage : ^5.0.2
18
+ flutter_secure_storage : 4.2.1
19
19
flutter_staggered_animations : ^1.0.0
20
20
fluttericon : ^2.0.0
21
21
google_fonts : 2.2.0
Original file line number Diff line number Diff line change 6
6
7
7
#include " generated_plugin_registrant.h"
8
8
9
- #include < flutter_secure_storage_windows/flutter_secure_storage_windows_plugin.h>
10
9
#include < url_launcher_windows/url_launcher_windows.h>
11
10
12
11
void RegisterPlugins (flutter::PluginRegistry* registry) {
13
- FlutterSecureStorageWindowsPluginRegisterWithRegistrar (
14
- registry->GetRegistrarForPlugin (" FlutterSecureStorageWindowsPlugin" ));
15
12
UrlLauncherWindowsRegisterWithRegistrar (
16
13
registry->GetRegistrarForPlugin (" UrlLauncherWindows" ));
17
14
}
Original file line number Diff line number Diff line change 3
3
#
4
4
5
5
list (APPEND FLUTTER_PLUGIN_LIST
6
- flutter_secure_storage_windows
7
6
url_launcher_windows
8
7
)
9
8
You can’t perform that action at this time.
0 commit comments