Просмотр исходного кода

P1-6 resterend afgerond: 5 velden guard (evenement_horecagelegenheid + horecagelegenheid_current) + establishmentnid-debugwidget verwijderd

- evenement_horecagelegenheid_widget.dart: bezorgkosten en bestellink
  krijgen nu dezelfde "Is Set"-Visibility-guard als de eerder afgeronde
  9 velden (JSON Path $[:].bezorgkosten / $[:].bestellink i.p.v. de
  letterlijke placeholder-tekst bij ontbrekende data). Vergeten
  debug-tekstwidget (Text(establishmentID), toonde permanent de rauwe
  nid) verwijderd uit de Info-tab.
- horecagelegenheid_current_widget.dart: title ($[:].titel), content
  (FromHTML, $[:].inhoud) en logo (Image, $[:].logo) krijgen dezelfde
  guard — logo was geen crash-risico maar wel een kapot-plaatje-icoon
  bij ontbrekende data.

Geverifieerd: verse export + flutter analyze (0 errors, alleen
pre-existente info/warning-lint, niet gerelateerd aan deze wijziging).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
bob 4 недель назад
Родитель
Сommit
14f2f1473c

+ 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>"; };
-		6436409E27A31CDF00820AF7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
-		6436409027A31CD100820AF7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		6436409527A31CDC00820AF7 /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+		6436409727A31CD400820AF7 /* 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 = (
-				6436409E27A31CDF00820AF7 /* nl */,
-				6436409027A31CD100820AF7 /* en */,
+				6436409527A31CDC00820AF7 /* nl */,
+				6436409727A31CD400820AF7 /* en */,
 			);
 			name = InfoPlist.strings;
 			sourceTree = "<group>";

+ 47 - 61
lib/evenement/evenement_horecagelegenheid/evenement_horecagelegenheid_widget.dart

@@ -429,31 +429,6 @@ class _EvenementHorecagelegenheidWidgetState
                         Column(
                           mainAxisSize: MainAxisSize.max,
                           children: [
-                            Text(
-                              valueOrDefault<String>(
-                                widget!.establishmentID,
-                                'establishmentnid',
-                              ),
-                              style: FlutterFlowTheme.of(context)
-                                  .bodyMedium
-                                  .override(
-                                    font: GoogleFonts.inter(
-                                      fontWeight: FlutterFlowTheme.of(context)
-                                          .bodyMedium
-                                          .fontWeight,
-                                      fontStyle: FlutterFlowTheme.of(context)
-                                          .bodyMedium
-                                          .fontStyle,
-                                    ),
-                                    letterSpacing: 0.0,
-                                    fontWeight: FlutterFlowTheme.of(context)
-                                        .bodyMedium
-                                        .fontWeight,
-                                    fontStyle: FlutterFlowTheme.of(context)
-                                        .bodyMedium
-                                        .fontStyle,
-                                  ),
-                            ),
                             if (EstablishmentInfoCall.establishmentEmail(
                                       columnEstablishmentInfoResponse.jsonBody,
                                     ) !=
@@ -1425,17 +1400,31 @@ class _EvenementHorecagelegenheidWidgetState
                                           .fontStyle,
                                     ),
                               ),
-                            Text(
-                              valueOrDefault<String>(
-                                EstablishmentInfoCall.establishmentBezorgkosten(
+                            if (getJsonField(
                                   columnEstablishmentInfoResponse.jsonBody,
+                                  r'''$[:].bezorgkosten''',
+                                ) !=
+                                null)
+                              Text(
+                                valueOrDefault<String>(
+                                  EstablishmentInfoCall
+                                      .establishmentBezorgkosten(
+                                    columnEstablishmentInfoResponse.jsonBody,
+                                  ),
+                                  'bezorgkosten',
                                 ),
-                                'bezorgkosten',
-                              ),
-                              style: FlutterFlowTheme.of(context)
-                                  .bodyMedium
-                                  .override(
-                                    font: GoogleFonts.inter(
+                                style: FlutterFlowTheme.of(context)
+                                    .bodyMedium
+                                    .override(
+                                      font: GoogleFonts.inter(
+                                        fontWeight: FlutterFlowTheme.of(context)
+                                            .bodyMedium
+                                            .fontWeight,
+                                        fontStyle: FlutterFlowTheme.of(context)
+                                            .bodyMedium
+                                            .fontStyle,
+                                      ),
+                                      letterSpacing: 0.0,
                                       fontWeight: FlutterFlowTheme.of(context)
                                           .bodyMedium
                                           .fontWeight,
@@ -1443,26 +1432,31 @@ class _EvenementHorecagelegenheidWidgetState
                                           .bodyMedium
                                           .fontStyle,
                                     ),
-                                    letterSpacing: 0.0,
-                                    fontWeight: FlutterFlowTheme.of(context)
-                                        .bodyMedium
-                                        .fontWeight,
-                                    fontStyle: FlutterFlowTheme.of(context)
-                                        .bodyMedium
-                                        .fontStyle,
-                                  ),
-                            ),
-                            Text(
-                              valueOrDefault<String>(
-                                EstablishmentInfoCall.establshmentBestellink(
+                              ),
+                            if (getJsonField(
                                   columnEstablishmentInfoResponse.jsonBody,
+                                  r'''$[:].bestellink''',
+                                ) !=
+                                null)
+                              Text(
+                                valueOrDefault<String>(
+                                  EstablishmentInfoCall.establshmentBestellink(
+                                    columnEstablishmentInfoResponse.jsonBody,
+                                  ),
+                                  'bestellink',
                                 ),
-                                'bestellink',
-                              ),
-                              style: FlutterFlowTheme.of(context)
-                                  .bodyMedium
-                                  .override(
-                                    font: GoogleFonts.inter(
+                                style: FlutterFlowTheme.of(context)
+                                    .bodyMedium
+                                    .override(
+                                      font: GoogleFonts.inter(
+                                        fontWeight: FlutterFlowTheme.of(context)
+                                            .bodyMedium
+                                            .fontWeight,
+                                        fontStyle: FlutterFlowTheme.of(context)
+                                            .bodyMedium
+                                            .fontStyle,
+                                      ),
+                                      letterSpacing: 0.0,
                                       fontWeight: FlutterFlowTheme.of(context)
                                           .bodyMedium
                                           .fontWeight,
@@ -1470,15 +1464,7 @@ class _EvenementHorecagelegenheidWidgetState
                                           .bodyMedium
                                           .fontStyle,
                                     ),
-                                    letterSpacing: 0.0,
-                                    fontWeight: FlutterFlowTheme.of(context)
-                                        .bodyMedium
-                                        .fontWeight,
-                                    fontStyle: FlutterFlowTheme.of(context)
-                                        .bodyMedium
-                                        .fontStyle,
-                                  ),
-                            ),
+                              ),
                             Builder(
                               builder: (context) {
                                 final afhaalopties = EstablishmentInfoCall

+ 75 - 54
lib/horecagelegenhedenoverzicht/horecagelegenheid_current/horecagelegenheid_current_widget.dart

@@ -399,38 +399,46 @@ class _HorecagelegenheidCurrentWidgetState
                       ),
                     ],
                   ),
-                  Text(
-                    valueOrDefault<String>(
-                      EstablishmentInfoCall.establshmentTitel(
+                  if (getJsonField(
                         horecagelegenheidCurrentEstablishmentInfoResponse
                             .jsonBody,
+                        r'''$[:].titel''',
+                      ) !=
+                      null)
+                    Text(
+                      valueOrDefault<String>(
+                        EstablishmentInfoCall.establshmentTitel(
+                          horecagelegenheidCurrentEstablishmentInfoResponse
+                              .jsonBody,
+                        ),
+                        'title',
                       ),
-                      'title',
-                    ),
-                    style: FlutterFlowTheme.of(context).headlineMedium.override(
-                      font: GoogleFonts.interTight(
+                      style:
+                          FlutterFlowTheme.of(context).headlineMedium.override(
+                        font: GoogleFonts.interTight(
+                          fontWeight: FlutterFlowTheme.of(context)
+                              .headlineMedium
+                              .fontWeight,
+                          fontStyle: FlutterFlowTheme.of(context)
+                              .headlineMedium
+                              .fontStyle,
+                        ),
+                        letterSpacing: 0.0,
                         fontWeight: FlutterFlowTheme.of(context)
                             .headlineMedium
                             .fontWeight,
                         fontStyle: FlutterFlowTheme.of(context)
                             .headlineMedium
                             .fontStyle,
+                        shadows: [
+                          Shadow(
+                            color: FlutterFlowTheme.of(context).secondaryText,
+                            offset: Offset(2.0, 2.0),
+                            blurRadius: 2.0,
+                          )
+                        ],
                       ),
-                      letterSpacing: 0.0,
-                      fontWeight: FlutterFlowTheme.of(context)
-                          .headlineMedium
-                          .fontWeight,
-                      fontStyle:
-                          FlutterFlowTheme.of(context).headlineMedium.fontStyle,
-                      shadows: [
-                        Shadow(
-                          color: FlutterFlowTheme.of(context).secondaryText,
-                          offset: Offset(2.0, 2.0),
-                          blurRadius: 2.0,
-                        )
-                      ],
                     ),
-                  ),
                   Expanded(
                     child: Column(
                       children: [
@@ -514,27 +522,33 @@ class _HorecagelegenheidCurrentWidgetState
                                   Column(
                                     mainAxisSize: MainAxisSize.max,
                                     children: [
-                                      ClipRRect(
-                                        borderRadius:
-                                            BorderRadius.circular(8.0),
-                                        child: CachedNetworkImage(
-                                          fadeInDuration:
-                                              Duration(milliseconds: 500),
-                                          fadeOutDuration:
-                                              Duration(milliseconds: 500),
-                                          imageUrl: valueOrDefault<String>(
-                                            EstablishmentInfoCall
-                                                .establshmentLogo(
-                                              horecagelegenheidCurrentEstablishmentInfoResponse
-                                                  .jsonBody,
+                                      if (getJsonField(
+                                            horecagelegenheidCurrentEstablishmentInfoResponse
+                                                .jsonBody,
+                                            r'''$[:].logo''',
+                                          ) !=
+                                          null)
+                                        ClipRRect(
+                                          borderRadius:
+                                              BorderRadius.circular(8.0),
+                                          child: CachedNetworkImage(
+                                            fadeInDuration:
+                                                Duration(milliseconds: 500),
+                                            fadeOutDuration:
+                                                Duration(milliseconds: 500),
+                                            imageUrl: valueOrDefault<String>(
+                                              EstablishmentInfoCall
+                                                  .establshmentLogo(
+                                                horecagelegenheidCurrentEstablishmentInfoResponse
+                                                    .jsonBody,
+                                              ),
+                                              'logo',
                                             ),
-                                            'logo',
+                                            width: 200.0,
+                                            height: 200.0,
+                                            fit: BoxFit.cover,
                                           ),
-                                          width: 200.0,
-                                          height: 200.0,
-                                          fit: BoxFit.cover,
                                         ),
-                                      ),
                                       if (EstablishmentInfoCall
                                                   .establishmentAdres(
                                                 horecagelegenheidCurrentEstablishmentInfoResponse
@@ -832,30 +846,37 @@ class _HorecagelegenheidCurrentWidgetState
                                   Column(
                                     mainAxisSize: MainAxisSize.max,
                                     children: [
-                                      Container(
-                                        width:
-                                            MediaQuery.sizeOf(context).width *
-                                                0.7,
-                                        height:
-                                            MediaQuery.sizeOf(context).height *
-                                                0.2,
-                                        child: custom_widgets.FromHTML(
+                                      if (getJsonField(
+                                            horecagelegenheidCurrentEstablishmentInfoResponse
+                                                .jsonBody,
+                                            r'''$[:].inhoud''',
+                                          ) !=
+                                          null)
+                                        Container(
                                           width:
                                               MediaQuery.sizeOf(context).width *
                                                   0.7,
                                           height: MediaQuery.sizeOf(context)
                                                   .height *
                                               0.2,
-                                          HTMLParameter: valueOrDefault<String>(
-                                            EstablishmentInfoCall
-                                                .establshmentInhoud(
-                                              horecagelegenheidCurrentEstablishmentInfoResponse
-                                                  .jsonBody,
+                                          child: custom_widgets.FromHTML(
+                                            width: MediaQuery.sizeOf(context)
+                                                    .width *
+                                                0.7,
+                                            height: MediaQuery.sizeOf(context)
+                                                    .height *
+                                                0.2,
+                                            HTMLParameter:
+                                                valueOrDefault<String>(
+                                              EstablishmentInfoCall
+                                                  .establshmentInhoud(
+                                                horecagelegenheidCurrentEstablishmentInfoResponse
+                                                    .jsonBody,
+                                              ),
+                                              'content',
                                             ),
-                                            'content',
                                           ),
                                         ),
-                                      ),
                                     ],
                                   ),
                                 ],