Преглед на файлове

P1-7 Tab 3-uitbreiding: nieuwe 4e tab 'Gebruiker' op Favorieten met werkende Uitloggen-knop (6 App State-velden geclear'd + Navigate To Login zonder terug-navigatie)

bob преди 1 месец
родител
ревизия
ba1e0b29e3
променени са 5 файла, в които са добавени 113 реда и са изтрити 9 реда
  1. 1 1
      android/app/build.gradle
  2. 2 2
      android/build.gradle
  3. 4 4
      ios/Runner.xcodeproj/project.pbxproj
  4. 94 2
      lib/favorieten/favorieten_widget.dart
  5. 12 0
      lib/flutter_flow/internationalization.dart

+ 1 - 1
android/app/build.gradle

@@ -55,7 +55,7 @@ android {
     defaultConfig {
         // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
         applicationId "com.uitgaanskrant.app"
-        minSdkVersion flutter.minSdkVersion
+        minSdkVersion 23
         targetSdkVersion 36
         versionCode flutterVersionCode.toInteger()
         versionName flutterVersionName

+ 2 - 2
android/build.gradle

@@ -43,6 +43,6 @@ subprojects {
     project.evaluationDependsOn(':app')
 }
 
-tasks.register("clean", Delete) {
-    delete rootProject.layout.buildDirectory
+task clean(type: Delete) {
+    delete rootProject.buildDir
 }

+ 4 - 4
ios/Runner.xcodeproj/project.pbxproj

@@ -44,8 +44,8 @@
 		97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
 		97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
-		6436409727A31CD200820AF7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		6436409B27A31CD000820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		6436409D27A31CD400820AF7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		6436409B27A31CDE00820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
 		97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
@@ -225,8 +225,8 @@
 		6436409C27A31CD800820AF7 /* InfoPlist.strings */ = {
 			isa = PBXVariantGroup;
 			children = (
-				6436409727A31CD200820AF7 /* nl */,
-				6436409B27A31CD000820AF7 /* en */,
+				6436409D27A31CD400820AF7 /* nl */,
+				6436409B27A31CDE00820AF7 /* en */,
 			);
 			name = InfoPlist.strings;
 			sourceTree = "<group>";

+ 94 - 2
lib/favorieten/favorieten_widget.dart

@@ -34,7 +34,7 @@ class _FavorietenWidgetState extends State<FavorietenWidget>
 
     _model.tabBarController = TabController(
       vsync: this,
-      length: 3,
+      length: 4,
       initialIndex: 0,
     )
       ..addListener(() => safeSetState(() {}))
@@ -175,10 +175,20 @@ class _FavorietenWidgetState extends State<FavorietenWidget>
                               'ygk8aifq' /* Favoriete Gelegenheden */,
                             ),
                           ),
+                          Tab(
+                            text: FFLocalizations.of(context).getText(
+                              'jwojezxv' /* Gebruiker */,
+                            ),
+                          ),
                         ],
                         controller: _model.tabBarController,
                         onTap: (i) async {
-                          [() async {}, () async {}, () async {}][i]();
+                          [
+                            () async {},
+                            () async {},
+                            () async {},
+                            () async {}
+                          ][i]();
                         },
                       ),
                     ),
@@ -412,6 +422,88 @@ class _FavorietenWidgetState extends State<FavorietenWidget>
                               ),
                             ],
                           ),
+                          Column(
+                            mainAxisSize: MainAxisSize.max,
+                            children: [
+                              InkWell(
+                                splashColor: Colors.transparent,
+                                focusColor: Colors.transparent,
+                                hoverColor: Colors.transparent,
+                                highlightColor: Colors.transparent,
+                                onTap: () async {
+                                  FFAppState().deleteUserToken();
+                                  FFAppState().userToken = '';
+
+                                  FFAppState().deleteUserSessionid();
+                                  FFAppState().userSessionid = '';
+
+                                  FFAppState().deleteUserSessionname();
+                                  FFAppState().userSessionname = '';
+
+                                  FFAppState().deleteUserName();
+                                  FFAppState().userName = '';
+
+                                  FFAppState().deleteUserUid();
+                                  FFAppState().userUid = 0;
+
+                                  FFAppState().deleteUserMail();
+                                  FFAppState().userMail = '';
+
+                                  safeSetState(() {});
+
+                                  context.goNamed(LoginWidget.routeName);
+                                },
+                                child: Material(
+                                  color: Colors.transparent,
+                                  child: ListTile(
+                                    title: Text(
+                                      FFLocalizations.of(context).getText(
+                                        '275gmehq' /* Uitloggen */,
+                                      ),
+                                      style: FlutterFlowTheme.of(context)
+                                          .titleLarge
+                                          .override(
+                                            font: GoogleFonts.interTight(
+                                              fontWeight:
+                                                  FlutterFlowTheme.of(context)
+                                                      .titleLarge
+                                                      .fontWeight,
+                                              fontStyle:
+                                                  FlutterFlowTheme.of(context)
+                                                      .titleLarge
+                                                      .fontStyle,
+                                            ),
+                                            letterSpacing: 0.0,
+                                            fontWeight:
+                                                FlutterFlowTheme.of(context)
+                                                    .titleLarge
+                                                    .fontWeight,
+                                            fontStyle:
+                                                FlutterFlowTheme.of(context)
+                                                    .titleLarge
+                                                    .fontStyle,
+                                          ),
+                                    ),
+                                    trailing: Icon(
+                                      Icons.arrow_forward_ios_rounded,
+                                      color: FlutterFlowTheme.of(context)
+                                          .secondaryText,
+                                      size: 24.0,
+                                    ),
+                                    tileColor: FlutterFlowTheme.of(context)
+                                        .secondaryBackground,
+                                    dense: false,
+                                    contentPadding:
+                                        EdgeInsetsDirectional.fromSTEB(
+                                            12.0, 0.0, 12.0, 0.0),
+                                    shape: RoundedRectangleBorder(
+                                      borderRadius: BorderRadius.circular(8.0),
+                                    ),
+                                  ),
+                                ),
+                              ),
+                            ],
+                          ),
                         ],
                       ),
                     ),

+ 12 - 0
lib/flutter_flow/internationalization.dart

@@ -433,6 +433,18 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
       'nl': '',
       'en': '',
     },
+    'jwojezxv': {
+      'nl': 'Gebruiker',
+      'en': '',
+    },
+    '275gmehq': {
+      'nl': 'Uitloggen',
+      'en': '',
+    },
+    'grngrmt3': {
+      'nl': '',
+      'en': '',
+    },
     'xyig2ny4': {
       'nl': 'Home',
       'en': '',