diff --git a/lib/main/introScreen.dart b/lib/main/introScreen.dart index f14d305..1258547 100644 --- a/lib/main/introScreen.dart +++ b/lib/main/introScreen.dart @@ -30,12 +30,6 @@ class _IntroScreenState extends State { color: Colors.blue[800], fontSize: 35, fontWeight: FontWeight.w600); EdgeInsets titlePadding = EdgeInsets.symmetric(vertical: 100); - @override - void initState() { - //Default value for personal substitute is false, prevent if the user doesn't change the switch - SharedPref().setBool(Names.personalSubstitute, false); - super.initState(); - } @override Widget build(BuildContext context) { @@ -130,7 +124,6 @@ class _IntroScreenState extends State { title: Text("Personalisierte Vertretung"), onChanged: (bool value) { setState(() => personalSubstitute = value); - SharedPref().setBool(Names.personalSubstitute, value); }, value: personalSubstitute, ), @@ -213,7 +206,8 @@ class _IntroScreenState extends State { alreadyPressed = true; ProgressDialog pr = ProgressDialog(context, isDismissible: false, showLogs: false); - + await SharedPref() + .setBool(Names.personalSubstitute, personalSubstitute); String name = nameController.text; if (name == "") name = "Nicht festgelegt"; if (kIsWeb) { diff --git a/pubspec.yaml b/pubspec.yaml index e5a5ec6..c8c3f76 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: LUL # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.3.6+30 +version: 1.3.7+31 environment: sdk: ">=2.2.2 <3.0.0"