Explorar el Código

FOTOBOEK: fotoboek in een bottom sheet, met zoekveld en callback

Opzet na Bob's feedback: het grid zit niet meer inline op de pagina maar
in een bijna schermvullende bottom sheet, met een zoekveld erboven.

FotoboekGridComponent:
- Column > TextField (zoek) + Expanded(GridView), shrinkWrap uit
- component state `zoekterm`, On Change vult 'm vanuit het tekstveld
- Backend Query stuurt `zoek` mee naar MijnFotos (filtert op bestandsnaam)
- tik op een foto roept bijKeuze(fid, url) aan en sluit de sheet
- bijKeuze is een Action-parameter; `url` is ImagePath, want een String
  is niet aan een Image-Path-page-state te binden

uitgaansevenementAanmaken:
- knop "Uit fotoboek" opent nu de sheet; de callback zet createLogoFid
  en createLogoUrl

dart analyze 0 errors. Wat nog moet (en waar Claude op vastliep) staat
in TASKS.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
bob hace 5 horas
padre
commit
f9459f03e4

+ 2 - 0
lib/backend/api_requests/api_calls.dart

@@ -1175,6 +1175,7 @@ class MijnFotosCall {
     String? sessid = '',
     int? page = 0,
     int? limit = 30,
+    String? zoek = '',
   }) async {
     return ApiManager.instance.makeApiCall(
       callName: 'MijnFotos',
@@ -1187,6 +1188,7 @@ class MijnFotosCall {
       params: {
         'page': page,
         'limit': limit,
+        'zoek': zoek,
       },
       returnBody: true,
       encodeBodyUtf8: false,

+ 118 - 0
lib/components/fotoboek_grid_component_copy_model.dart

@@ -0,0 +1,118 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/shared/lege_lijst_component/lege_lijst_component_widget.dart';
+import 'dart:ui';
+import 'fotoboek_grid_component_copy_widget.dart'
+    show FotoboekGridComponentCopyWidget;
+import 'package:flutter/material.dart';
+import 'package:flutter_spinkit/flutter_spinkit.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:provider/provider.dart';
+
+class FotoboekGridComponentCopyModel
+    extends FlutterFlowModel<FotoboekGridComponentCopyWidget> {
+  ///  Local state fields for this component.
+
+  String _zoekterm = '';
+  set zoekterm(String value) {
+    _zoekterm = value;
+    debugLogWidgetClass(this);
+  }
+
+  String get zoekterm => _zoekterm;
+
+  final Map<String, DebugDataField> debugGeneratorVariables = {};
+  final Map<String, DebugDataField> debugBackendQueries = {};
+  final Map<String, FlutterFlowModel> widgetBuilderComponents = {};
+  @override
+  void initState(BuildContext context) {}
+
+  @override
+  void dispose() {}
+
+  @override
+  WidgetClassDebugData toWidgetClassDebugData() => WidgetClassDebugData(
+        widgetParameters: {
+          'parameter1': debugSerializeParam(
+            widget?.parameter1,
+            ParamType.JSON,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+            searchReference:
+                'reference=ShoKFAoKcGFyYW1ldGVyMRIGOWQ1dXgxcgIICVAAWgpwYXJhbWV0ZXIx',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'parameter2': debugSerializeParam(
+            widget?.parameter2,
+            ParamType.JSON,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+            searchReference:
+                'reference=ShoKFAoKcGFyYW1ldGVyMhIGb2o2cGM5cgIICVAAWgpwYXJhbWV0ZXIy',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'parameter3': debugSerializeParam(
+            widget?.parameter3,
+            ParamType.JSON,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+            searchReference:
+                'reference=ShoKFAoKcGFyYW1ldGVyMxIGdXN6MTgwcgIICVAAWgpwYXJhbWV0ZXIz',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'parameter4': debugSerializeParam(
+            widget?.parameter4,
+            ParamType.JSON,
+            isList: true,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+            searchReference:
+                'reference=ShwKFAoKcGFyYW1ldGVyNBIGOWp4OHEwcgQSAggJUABaCnBhcmFtZXRlcjQ=',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'bijKeuze': debugSerializeParam(
+            widget?.bijKeuze,
+            ParamType.Action,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+            searchReference:
+                'reference=SkgKEgoIYmlqS2V1emUSBnM2azYyaXIyCBUgATIVCg0KA2ZpZBIGbnNuaGl6cgQIAyABMhUKDQoDdXJsEgZtd3N5eW1yBAgDIAFQAFoIYmlqS2V1emU=',
+            name: 'Future Function(String fid, String url)',
+            nullable: true,
+          )
+        }.withoutNulls.entries,
+        localStates: {
+          'zoekterm': debugSerializeParam(
+            zoekterm,
+            ParamType.String,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+            searchReference:
+                'reference=Qh0KEQoIem9la3Rlcm0SBXdoaWpuKgISAHIECAMgAVAAWgh6b2VrdGVybWIZRm90b2JvZWtHcmlkQ29tcG9uZW50Q29weQ==',
+            name: 'String',
+            nullable: false,
+          )
+        }.entries,
+        generatorVariables: debugGeneratorVariables.entries,
+        backendQueries: debugBackendQueries.entries,
+        componentStates: {
+          ...widgetBuilderComponents.map(
+            (key, value) => MapEntry(
+              key,
+              value.toWidgetClassDebugData(),
+            ),
+          ),
+        }.withoutNulls.entries,
+        link:
+            'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd/tab=uiBuilder&page=FotoboekGridComponentCopy',
+        searchReference:
+            'reference=OhlGb3RvYm9la0dyaWRDb21wb25lbnRDb3B5UABaGUZvdG9ib2VrR3JpZENvbXBvbmVudENvcHk=',
+        widgetClassName: 'FotoboekGridComponentCopy',
+      );
+}

+ 218 - 0
lib/components/fotoboek_grid_component_copy_widget.dart

@@ -0,0 +1,218 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/shared/lege_lijst_component/lege_lijst_component_widget.dart';
+import 'dart:ui';
+import 'package:flutter/material.dart';
+import 'package:flutter_spinkit/flutter_spinkit.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:provider/provider.dart';
+import 'fotoboek_grid_component_copy_model.dart';
+export 'fotoboek_grid_component_copy_model.dart';
+
+class FotoboekGridComponentCopyWidget extends StatefulWidget {
+  const FotoboekGridComponentCopyWidget({
+    super.key,
+    this.parameter1,
+    this.parameter2,
+    this.parameter3,
+    this.parameter4,
+    required this.bijKeuze,
+  });
+
+  final dynamic parameter1;
+  final dynamic parameter2;
+  final dynamic parameter3;
+  final List<dynamic>? parameter4;
+  final Future Function(String fid, String url)? bijKeuze;
+
+  @override
+  State<FotoboekGridComponentCopyWidget> createState() =>
+      _FotoboekGridComponentCopyWidgetState();
+}
+
+class _FotoboekGridComponentCopyWidgetState
+    extends State<FotoboekGridComponentCopyWidget> with RouteAware {
+  late FotoboekGridComponentCopyModel _model;
+
+  @override
+  void setState(VoidCallback callback) {
+    super.setState(callback);
+    _model.onUpdate();
+  }
+
+  @override
+  void initState() {
+    super.initState();
+    _model = createModel(context, () => FotoboekGridComponentCopyModel());
+  }
+
+  @override
+  void dispose() {
+    routeObserver.unsubscribe(this);
+
+    _model.maybeDispose();
+
+    super.dispose();
+  }
+
+  @override
+  void didUpdateWidget(FotoboekGridComponentCopyWidget oldWidget) {
+    super.didUpdateWidget(oldWidget);
+    _model.widget = widget;
+  }
+
+  @override
+  void didChangeDependencies() {
+    super.didChangeDependencies();
+    final route = DebugModalRoute.of(context);
+    if (route != null) {
+      routeObserver.subscribe(this, route);
+    }
+    debugLogGlobalProperty(context);
+  }
+
+  @override
+  void didPopNext() {
+    if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
+      setState(() => _model.isRouteVisible = true);
+      debugLogWidgetClass(_model);
+    }
+  }
+
+  @override
+  void didPush() {
+    if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
+      setState(() => _model.isRouteVisible = true);
+      debugLogWidgetClass(_model);
+    }
+  }
+
+  @override
+  void didPop() {
+    _model.isRouteVisible = false;
+  }
+
+  @override
+  void didPushNext() {
+    _model.isRouteVisible = false;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    DebugFlutterFlowModelContext.maybeOf(context)
+        ?.parentModelCallback
+        ?.call(_model);
+    context.watch<FFAppState>();
+
+    return FutureBuilder<ApiCallResponse>(
+      future: MijnFotosCall.call(
+        sessionName: FFAppState().userSessionname,
+        sessid: FFAppState().userSessionid,
+      ),
+      builder: (context, snapshot) {
+        // Customize what your widget looks like when it's loading.
+        if (!snapshot.hasData) {
+          return Center(
+            child: SizedBox(
+              width: 80.0,
+              height: 80.0,
+              child: SpinKitFadingCircle(
+                color: FlutterFlowTheme.of(context).primary,
+                size: 80.0,
+              ),
+            ),
+          );
+        }
+        final gridViewMijnFotosResponse = snapshot.data!;
+        _model.debugBackendQueries[
+            'MijnFotosCall_statusCode_GridView_ilbfk6hl'] = debugSerializeParam(
+          gridViewMijnFotosResponse.statusCode,
+          ParamType.int,
+          link:
+              'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+          name: 'int',
+          nullable: false,
+        );
+        _model.debugBackendQueries[
+                'MijnFotosCall_responseBody_GridView_ilbfk6hl'] =
+            debugSerializeParam(
+          gridViewMijnFotosResponse.bodyText,
+          ParamType.String,
+          link:
+              'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+          name: 'String',
+          nullable: false,
+        );
+        debugLogWidgetClass(_model);
+
+        return Builder(
+          builder: (context) {
+            final fotoboekItem = MijnFotosCall.items(
+                  gridViewMijnFotosResponse.jsonBody,
+                )?.toList() ??
+                [];
+            if (fotoboekItem.isEmpty) {
+              return Center(
+                child: LegeLijstComponentWidget(
+                  tekst:
+                      'Je hebt nog geen foto\'s. Upload er een met Logo kiezen.',
+                ),
+              );
+            }
+            _model.debugGeneratorVariables[
+                    'fotoboekItem${fotoboekItem.length > 100 ? ' (first 100)' : ''}'] =
+                debugSerializeParam(
+              fotoboekItem.take(100),
+              ParamType.JSON,
+              isList: true,
+              link:
+                  'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponentCopy',
+              name: 'dynamic',
+              nullable: false,
+            );
+            debugLogWidgetClass(_model);
+
+            return GridView.builder(
+              padding: EdgeInsets.zero,
+              gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                crossAxisCount: 3,
+                crossAxisSpacing: 10.0,
+                mainAxisSpacing: 10.0,
+                childAspectRatio: 1.0,
+              ),
+              shrinkWrap: true,
+              scrollDirection: Axis.vertical,
+              itemCount: fotoboekItem.length,
+              itemBuilder: (context, fotoboekItemIndex) {
+                final fotoboekItemItem = fotoboekItem[fotoboekItemIndex];
+                return InkWell(
+                  splashColor: Colors.transparent,
+                  focusColor: Colors.transparent,
+                  hoverColor: Colors.transparent,
+                  highlightColor: Colors.transparent,
+                  onTap: () async {
+                    safeSetState(() {});
+                  },
+                  child: ClipRRect(
+                    borderRadius: BorderRadius.circular(8.0),
+                    child: Image.network(
+                      getJsonField(
+                        fotoboekItemItem,
+                        r'''$.thumb''',
+                      ).toString(),
+                      width: double.infinity,
+                      height: double.infinity,
+                      fit: BoxFit.cover,
+                    ),
+                  ),
+                );
+              },
+            );
+          },
+        );
+      },
+    );
+  }
+}

+ 138 - 0
lib/components/fotoboek_grid_component_model.dart

@@ -0,0 +1,138 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/shared/lege_lijst_component/lege_lijst_component_widget.dart';
+import 'dart:ui';
+import 'fotoboek_grid_component_widget.dart' show FotoboekGridComponentWidget;
+import 'package:easy_debounce/easy_debounce.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_spinkit/flutter_spinkit.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:provider/provider.dart';
+
+class FotoboekGridComponentModel
+    extends FlutterFlowModel<FotoboekGridComponentWidget> {
+  ///  Local state fields for this component.
+
+  String _zoekterm = '';
+  set zoekterm(String value) {
+    _zoekterm = value;
+    debugLogWidgetClass(this);
+  }
+
+  String get zoekterm => _zoekterm;
+
+  ///  State fields for stateful widgets in this component.
+
+  // State field(s) for TextField widget.
+  FocusNode? textFieldFocusNode;
+  TextEditingController? textController;
+  String? Function(BuildContext, String?)? textControllerValidator;
+
+  final Map<String, DebugDataField> debugGeneratorVariables = {};
+  final Map<String, DebugDataField> debugBackendQueries = {};
+  final Map<String, FlutterFlowModel> widgetBuilderComponents = {};
+  @override
+  void initState(BuildContext context) {}
+
+  @override
+  void dispose() {
+    textFieldFocusNode?.dispose();
+    textController?.dispose();
+  }
+
+  @override
+  WidgetClassDebugData toWidgetClassDebugData() => WidgetClassDebugData(
+        widgetParameters: {
+          'parameter1': debugSerializeParam(
+            widget?.parameter1,
+            ParamType.JSON,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            searchReference:
+                'reference=ShoKFAoKcGFyYW1ldGVyMRIGOWQ1dXgxcgIICVAAWgpwYXJhbWV0ZXIx',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'parameter2': debugSerializeParam(
+            widget?.parameter2,
+            ParamType.JSON,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            searchReference:
+                'reference=ShoKFAoKcGFyYW1ldGVyMhIGb2o2cGM5cgIICVAAWgpwYXJhbWV0ZXIy',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'parameter3': debugSerializeParam(
+            widget?.parameter3,
+            ParamType.JSON,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            searchReference:
+                'reference=ShoKFAoKcGFyYW1ldGVyMxIGdXN6MTgwcgIICVAAWgpwYXJhbWV0ZXIz',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'parameter4': debugSerializeParam(
+            widget?.parameter4,
+            ParamType.JSON,
+            isList: true,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            searchReference:
+                'reference=ShwKFAoKcGFyYW1ldGVyNBIGOWp4OHEwcgQSAggJUABaCnBhcmFtZXRlcjQ=',
+            name: 'dynamic',
+            nullable: true,
+          ),
+          'bijKeuze': debugSerializeParam(
+            widget?.bijKeuze,
+            ParamType.Action,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            searchReference:
+                'reference=SkgKEgoIYmlqS2V1emUSBnM2azYyaXIyCBUgATIVCg0KA2ZpZBIGbnNuaGl6cgQIAyABMhUKDQoDdXJsEgZtd3N5eW1yBAgEIAFQAFoIYmlqS2V1emU=',
+            name: 'Future Function(String fid, String url)',
+            nullable: true,
+          )
+        }.withoutNulls.entries,
+        localStates: {
+          'zoekterm': debugSerializeParam(
+            zoekterm,
+            ParamType.String,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            searchReference:
+                'reference=Qh0KEQoIem9la3Rlcm0SBXdoaWpuKgISAHIECAMgAVAAWgh6b2VrdGVybWIVRm90b2JvZWtHcmlkQ29tcG9uZW50',
+            name: 'String',
+            nullable: false,
+          )
+        }.entries,
+        widgetStates: {
+          'textFieldText': debugSerializeParam(
+            textController?.text,
+            ParamType.String,
+            link:
+                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+            name: 'String',
+            nullable: true,
+          )
+        }.entries,
+        generatorVariables: debugGeneratorVariables.entries,
+        backendQueries: debugBackendQueries.entries,
+        componentStates: {
+          ...widgetBuilderComponents.map(
+            (key, value) => MapEntry(
+              key,
+              value.toWidgetClassDebugData(),
+            ),
+          ),
+        }.withoutNulls.entries,
+        link:
+            'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd/tab=uiBuilder&page=FotoboekGridComponent',
+        searchReference:
+            'reference=OhVGb3RvYm9la0dyaWRDb21wb25lbnRQAFoVRm90b2JvZWtHcmlkQ29tcG9uZW50',
+        widgetClassName: 'FotoboekGridComponent',
+      );
+}

+ 338 - 0
lib/components/fotoboek_grid_component_widget.dart

@@ -0,0 +1,338 @@
+import '/backend/api_requests/api_calls.dart';
+import '/flutter_flow/flutter_flow_theme.dart';
+import '/flutter_flow/flutter_flow_util.dart';
+import '/flutter_flow/flutter_flow_widgets.dart';
+import '/shared/lege_lijst_component/lege_lijst_component_widget.dart';
+import 'dart:ui';
+import 'package:easy_debounce/easy_debounce.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_spinkit/flutter_spinkit.dart';
+import 'package:google_fonts/google_fonts.dart';
+import 'package:provider/provider.dart';
+import 'fotoboek_grid_component_model.dart';
+export 'fotoboek_grid_component_model.dart';
+
+class FotoboekGridComponentWidget extends StatefulWidget {
+  const FotoboekGridComponentWidget({
+    super.key,
+    this.parameter1,
+    this.parameter2,
+    this.parameter3,
+    this.parameter4,
+    required this.bijKeuze,
+  });
+
+  final dynamic parameter1;
+  final dynamic parameter2;
+  final dynamic parameter3;
+  final List<dynamic>? parameter4;
+  final Future Function(String fid, String url)? bijKeuze;
+
+  @override
+  State<FotoboekGridComponentWidget> createState() =>
+      _FotoboekGridComponentWidgetState();
+}
+
+class _FotoboekGridComponentWidgetState
+    extends State<FotoboekGridComponentWidget> with RouteAware {
+  late FotoboekGridComponentModel _model;
+
+  @override
+  void setState(VoidCallback callback) {
+    super.setState(callback);
+    _model.onUpdate();
+  }
+
+  @override
+  void initState() {
+    super.initState();
+    _model = createModel(context, () => FotoboekGridComponentModel());
+
+    _model.textController ??= TextEditingController()
+      ..addListener(() {
+        debugLogWidgetClass(_model);
+      });
+    _model.textFieldFocusNode ??= FocusNode();
+  }
+
+  @override
+  void dispose() {
+    routeObserver.unsubscribe(this);
+
+    _model.maybeDispose();
+
+    super.dispose();
+  }
+
+  @override
+  void didUpdateWidget(FotoboekGridComponentWidget oldWidget) {
+    super.didUpdateWidget(oldWidget);
+    _model.widget = widget;
+  }
+
+  @override
+  void didChangeDependencies() {
+    super.didChangeDependencies();
+    final route = DebugModalRoute.of(context);
+    if (route != null) {
+      routeObserver.subscribe(this, route);
+    }
+    debugLogGlobalProperty(context);
+  }
+
+  @override
+  void didPopNext() {
+    if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
+      setState(() => _model.isRouteVisible = true);
+      debugLogWidgetClass(_model);
+    }
+  }
+
+  @override
+  void didPush() {
+    if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
+      setState(() => _model.isRouteVisible = true);
+      debugLogWidgetClass(_model);
+    }
+  }
+
+  @override
+  void didPop() {
+    _model.isRouteVisible = false;
+  }
+
+  @override
+  void didPushNext() {
+    _model.isRouteVisible = false;
+  }
+
+  @override
+  Widget build(BuildContext context) {
+    DebugFlutterFlowModelContext.maybeOf(context)
+        ?.parentModelCallback
+        ?.call(_model);
+    context.watch<FFAppState>();
+
+    return Column(
+      mainAxisSize: MainAxisSize.max,
+      children: [
+        Expanded(
+          child: FutureBuilder<ApiCallResponse>(
+            future: MijnFotosCall.call(
+              sessionName: FFAppState().userSessionname,
+              sessid: FFAppState().userSessionid,
+              zoek: _model.zoekterm,
+            ),
+            builder: (context, snapshot) {
+              // Customize what your widget looks like when it's loading.
+              if (!snapshot.hasData) {
+                return Center(
+                  child: SizedBox(
+                    width: 80.0,
+                    height: 80.0,
+                    child: SpinKitFadingCircle(
+                      color: FlutterFlowTheme.of(context).primary,
+                      size: 80.0,
+                    ),
+                  ),
+                );
+              }
+              final gridViewMijnFotosResponse = snapshot.data!;
+              _model.debugBackendQueries[
+                      'MijnFotosCall_statusCode_GridView_inry4ta6'] =
+                  debugSerializeParam(
+                gridViewMijnFotosResponse.statusCode,
+                ParamType.int,
+                link:
+                    'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+                name: 'int',
+                nullable: false,
+              );
+              _model.debugBackendQueries[
+                      'MijnFotosCall_responseBody_GridView_inry4ta6'] =
+                  debugSerializeParam(
+                gridViewMijnFotosResponse.bodyText,
+                ParamType.String,
+                link:
+                    'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+                name: 'String',
+                nullable: false,
+              );
+              debugLogWidgetClass(_model);
+
+              return Builder(
+                builder: (context) {
+                  final fotoboekItem = MijnFotosCall.items(
+                        gridViewMijnFotosResponse.jsonBody,
+                      )?.toList() ??
+                      [];
+                  if (fotoboekItem.isEmpty) {
+                    return Center(
+                      child: LegeLijstComponentWidget(
+                        tekst:
+                            'Je hebt nog geen foto\'s. Upload er een met Logo kiezen.',
+                      ),
+                    );
+                  }
+                  _model.debugGeneratorVariables[
+                          'fotoboekItem${fotoboekItem.length > 100 ? ' (first 100)' : ''}'] =
+                      debugSerializeParam(
+                    fotoboekItem.take(100),
+                    ParamType.JSON,
+                    isList: true,
+                    link:
+                        'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=FotoboekGridComponent',
+                    name: 'dynamic',
+                    nullable: false,
+                  );
+                  debugLogWidgetClass(_model);
+
+                  return GridView.builder(
+                    padding: EdgeInsets.zero,
+                    gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
+                      crossAxisCount: 3,
+                      crossAxisSpacing: 10.0,
+                      mainAxisSpacing: 10.0,
+                      childAspectRatio: 1.0,
+                    ),
+                    scrollDirection: Axis.vertical,
+                    itemCount: fotoboekItem.length,
+                    itemBuilder: (context, fotoboekItemIndex) {
+                      final fotoboekItemItem = fotoboekItem[fotoboekItemIndex];
+                      return InkWell(
+                        splashColor: Colors.transparent,
+                        focusColor: Colors.transparent,
+                        hoverColor: Colors.transparent,
+                        highlightColor: Colors.transparent,
+                        onTap: () async {
+                          await widget.bijKeuze?.call(
+                            getJsonField(
+                              fotoboekItemItem,
+                              r'''$.fid''',
+                            ).toString(),
+                            getJsonField(
+                              fotoboekItemItem,
+                              r'''$.url''',
+                            ).toString(),
+                          );
+                          Navigator.pop(context);
+                        },
+                        child: ClipRRect(
+                          borderRadius: BorderRadius.circular(8.0),
+                          child: Image.network(
+                            getJsonField(
+                              fotoboekItemItem,
+                              r'''$.thumb''',
+                            ).toString(),
+                            width: double.infinity,
+                            height: double.infinity,
+                            fit: BoxFit.cover,
+                          ),
+                        ),
+                      );
+                    },
+                  );
+                },
+              );
+            },
+          ),
+        ),
+        Container(
+          width: double.infinity,
+          child: TextFormField(
+            controller: _model.textController,
+            focusNode: _model.textFieldFocusNode,
+            onChanged: (_) => EasyDebounce.debounce(
+              '_model.textController',
+              Duration(milliseconds: 2000),
+              () async {
+                _model.zoekterm = _model.textController.text;
+                safeSetState(() {});
+              },
+            ),
+            autofocus: false,
+            enabled: true,
+            obscureText: false,
+            decoration: InputDecoration(
+              isDense: true,
+              labelStyle: FlutterFlowTheme.of(context).labelMedium.override(
+                    font: GoogleFonts.roboto(
+                      fontWeight:
+                          FlutterFlowTheme.of(context).labelMedium.fontWeight,
+                      fontStyle:
+                          FlutterFlowTheme.of(context).labelMedium.fontStyle,
+                    ),
+                    letterSpacing: 0.0,
+                    fontWeight:
+                        FlutterFlowTheme.of(context).labelMedium.fontWeight,
+                    fontStyle:
+                        FlutterFlowTheme.of(context).labelMedium.fontStyle,
+                  ),
+              hintText: FFLocalizations.of(context).getText(
+                'p5wf8u4i' /* TextField */,
+              ),
+              hintStyle: FlutterFlowTheme.of(context).labelMedium.override(
+                    font: GoogleFonts.roboto(
+                      fontWeight:
+                          FlutterFlowTheme.of(context).labelMedium.fontWeight,
+                      fontStyle:
+                          FlutterFlowTheme.of(context).labelMedium.fontStyle,
+                    ),
+                    letterSpacing: 0.0,
+                    fontWeight:
+                        FlutterFlowTheme.of(context).labelMedium.fontWeight,
+                    fontStyle:
+                        FlutterFlowTheme.of(context).labelMedium.fontStyle,
+                  ),
+              enabledBorder: OutlineInputBorder(
+                borderSide: BorderSide(
+                  color: Color(0x00000000),
+                  width: 1.0,
+                ),
+                borderRadius: BorderRadius.circular(8.0),
+              ),
+              focusedBorder: OutlineInputBorder(
+                borderSide: BorderSide(
+                  color: Color(0x00000000),
+                  width: 1.0,
+                ),
+                borderRadius: BorderRadius.circular(8.0),
+              ),
+              errorBorder: OutlineInputBorder(
+                borderSide: BorderSide(
+                  color: FlutterFlowTheme.of(context).error,
+                  width: 1.0,
+                ),
+                borderRadius: BorderRadius.circular(8.0),
+              ),
+              focusedErrorBorder: OutlineInputBorder(
+                borderSide: BorderSide(
+                  color: FlutterFlowTheme.of(context).error,
+                  width: 1.0,
+                ),
+                borderRadius: BorderRadius.circular(8.0),
+              ),
+              filled: true,
+              fillColor: FlutterFlowTheme.of(context).secondaryBackground,
+            ),
+            style: FlutterFlowTheme.of(context).bodyMedium.override(
+                  font: GoogleFonts.roboto(
+                    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,
+                ),
+            cursorColor: FlutterFlowTheme.of(context).primaryText,
+            enableInteractiveSelection: true,
+            validator: _model.textControllerValidator.asValidator(context),
+          ),
+        ),
+      ],
+    );
+  }
+}

+ 1 - 1
lib/favorieten/favorieten_widget.dart

@@ -243,7 +243,7 @@ class _FavorietenWidgetState extends State<FavorietenWidget>
                           ),
                           Tab(
                             text: FFLocalizations.of(context).getText(
-                              'y9b1k3hk' /* Gebruiker */,
+                              '2nyldbpj' /* Gebruiker */,
                             ),
                           ),
                         ],

+ 1 - 1
lib/flutter_flow/custom_functions.dart

@@ -295,7 +295,7 @@ String? filterDatumVan(String? keuze) {
   final nu = DateTime.now();
   int extra = 0;
   if (soort == 'weekend' && nu.weekday < 6) {
-    extra = 6 - nu.weekday;
+    extra = 5 - nu.weekday; // 5 = vrijdag
   }
   final start = DateTime(nu.year, nu.month, nu.day + extra);
   final maand = start.month.toString().padLeft(2, '0');

+ 8 - 5
lib/flutter_flow/internationalization.dart

@@ -201,10 +201,6 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
       'nl': 'Bezorgen',
       'en': 'Delivery',
     },
-    'ukbd1ac9': {
-      'nl': 'Alle horecagelegenheden',
-      'en': 'All venues',
-    },
     '6gfap72a': {
       'nl': 'Home',
       'en': 'Home',
@@ -368,7 +364,7 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
       'nl': 'Favoriete Gelegenheden',
       'en': 'Favorite Establishment',
     },
-    'y9b1k3hk': {
+    '2nyldbpj': {
       'nl': 'Gebruiker',
       'en': 'User',
     },
@@ -2149,6 +2145,13 @@ final kTranslationsMap = <Map<String, Map<String, String>>>[
       'en': 'or pick a favorite',
     },
   },
+  // FotoboekGridComponent
+  {
+    'p5wf8u4i': {
+      'nl': 'TextField',
+      'en': '',
+    },
+  },
   // Miscellaneous
   {
     '1wdja323': {

+ 0 - 1
lib/horecagelegenhedenoverzicht/horecagelegenheid_current/horecagelegenheid_current_model.dart

@@ -10,7 +10,6 @@ import '/shared/drawer_component/drawer_component_widget.dart';
 import 'dart:ui';
 import '/custom_code/actions/index.dart' as actions;
 import '/flutter_flow/custom_functions.dart' as functions;
-import '/index.dart';
 import 'horecagelegenheid_current_widget.dart'
     show HorecagelegenheidCurrentWidget;
 import 'package:aligned_tooltip/aligned_tooltip.dart';

+ 0 - 46
lib/horecagelegenhedenoverzicht/horecagelegenheid_current/horecagelegenheid_current_widget.dart

@@ -10,7 +10,6 @@ import '/shared/drawer_component/drawer_component_widget.dart';
 import 'dart:ui';
 import '/custom_code/actions/index.dart' as actions;
 import '/flutter_flow/custom_functions.dart' as functions;
-import '/index.dart';
 import 'package:aligned_tooltip/aligned_tooltip.dart';
 import 'package:carousel_slider/carousel_slider.dart';
 import 'package:cached_network_image/cached_network_image.dart';
@@ -1591,51 +1590,6 @@ class _HorecagelegenheidCurrentWidgetState
                       ],
                     ),
                   ),
-                  FFButtonWidget(
-                    onPressed: () async {
-                      context.pushNamed(
-                        HorecagelegenhedenOverzichtCurrentWidget.routeName,
-                        queryParameters: {
-                          'plaats': serializeParam(
-                            FFAppState().gemeenteSelectId,
-                            ParamType.String,
-                          ),
-                        }.withoutNulls,
-                      );
-                    },
-                    text: FFLocalizations.of(context).getText(
-                      'ukbd1ac9' /* Alle horecagelegenheden */,
-                    ),
-                    options: FFButtonOptions(
-                      height: 40.0,
-                      padding:
-                          EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 0.0),
-                      iconPadding:
-                          EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
-                      color: FlutterFlowTheme.of(context).secondary,
-                      textStyle:
-                          FlutterFlowTheme.of(context).titleSmall.override(
-                                font: GoogleFonts.roboto(
-                                  fontWeight: FlutterFlowTheme.of(context)
-                                      .titleSmall
-                                      .fontWeight,
-                                  fontStyle: FlutterFlowTheme.of(context)
-                                      .titleSmall
-                                      .fontStyle,
-                                ),
-                                color: Colors.white,
-                                letterSpacing: 0.0,
-                                fontWeight: FlutterFlowTheme.of(context)
-                                    .titleSmall
-                                    .fontWeight,
-                                fontStyle: FlutterFlowTheme.of(context)
-                                    .titleSmall
-                                    .fontStyle,
-                              ),
-                      elevation: 0.0,
-                      borderRadius: BorderRadius.circular(8.0),
-                    ),
-                  ),
                 ],
               ),
             ),

+ 8 - 1
lib/uitgaansevenement_aanmaken/uitgaansevenement_aanmaken_model.dart

@@ -1,4 +1,5 @@
 import '/backend/api_requests/api_calls.dart';
+import '/components/fotoboek_grid_component_widget.dart';
 import '/components/header_buttons_component_widget.dart';
 import '/flutter_flow/flutter_flow_drop_down.dart';
 import '/flutter_flow/flutter_flow_theme.dart';
@@ -7,7 +8,6 @@ import '/flutter_flow/flutter_flow_widgets.dart';
 import '/flutter_flow/form_field_controller.dart';
 import '/flutter_flow/upload_data.dart';
 import '/shared/drawer_component/drawer_component_widget.dart';
-import '/shared/lege_lijst_component/lege_lijst_component_widget.dart';
 import 'dart:ui';
 import '/custom_code/actions/index.dart' as actions;
 import '/flutter_flow/custom_functions.dart' as functions;
@@ -248,6 +248,8 @@ class UitgaansevenementAanmakenModel
 
   dynamic? get fotoEvenementuploadResult => _fotoEvenementuploadResult;
 
+  // Model for FotoboekGridComponent component.
+  late FotoboekGridComponentModel fotoboekGridComponentModel;
   // Stores action output result for [Custom Action - evenementCreate] action in ButtonIndienen widget.
   dynamic? _createResult;
   set createResult(dynamic? value) {
@@ -267,6 +269,8 @@ class UitgaansevenementAanmakenModel
   final Map<String, FlutterFlowModel> widgetBuilderComponents = {};
   @override
   void initState(BuildContext context) {
+    fotoboekGridComponentModel =
+        createModel(context, () => FotoboekGridComponentModel());
     headerButtonsComponentModel =
         createModel(context, () => HeaderButtonsComponentModel());
     drawerComponentModel = createModel(context, () => DrawerComponentModel());
@@ -300,6 +304,7 @@ class UitgaansevenementAanmakenModel
     textFieldEntreeprijsFocusNode?.dispose();
     textFieldEntreeprijsTextController?.dispose();
 
+    fotoboekGridComponentModel.dispose();
     headerButtonsComponentModel.dispose();
     drawerComponentModel.dispose();
   }
@@ -541,6 +546,8 @@ class UitgaansevenementAanmakenModel
         generatorVariables: debugGeneratorVariables.entries,
         backendQueries: debugBackendQueries.entries,
         componentStates: {
+          'fotoboekGridComponentModel (FotoboekGridComponent)':
+              fotoboekGridComponentModel?.toWidgetClassDebugData(),
           'headerButtonsComponentModel (HeaderButtonsComponent)':
               headerButtonsComponentModel?.toWidgetClassDebugData(),
           'drawerComponentModel (drawerComponent)':

+ 42 - 139
lib/uitgaansevenement_aanmaken/uitgaansevenement_aanmaken_widget.dart

@@ -1,4 +1,5 @@
 import '/backend/api_requests/api_calls.dart';
+import '/components/fotoboek_grid_component_widget.dart';
 import '/components/header_buttons_component_widget.dart';
 import '/flutter_flow/flutter_flow_drop_down.dart';
 import '/flutter_flow/flutter_flow_theme.dart';
@@ -7,7 +8,6 @@ import '/flutter_flow/flutter_flow_widgets.dart';
 import '/flutter_flow/form_field_controller.dart';
 import '/flutter_flow/upload_data.dart';
 import '/shared/drawer_component/drawer_component_widget.dart';
-import '/shared/lege_lijst_component/lege_lijst_component_widget.dart';
 import 'dart:ui';
 import '/custom_code/actions/index.dart' as actions;
 import '/flutter_flow/custom_functions.dart' as functions;
@@ -2780,8 +2780,35 @@ class _UitgaansevenementAanmakenWidgetState
                               alignment: AlignmentDirectional(-1.0, 0.0),
                               child: FFButtonWidget(
                                 onPressed: () async {
-                                  _model.fotoboekOpen = !_model.fotoboekOpen;
-                                  safeSetState(() {});
+                                  await showModalBottomSheet(
+                                    isScrollControlled: true,
+                                    backgroundColor: Colors.transparent,
+                                    enableDrag: false,
+                                    context: context,
+                                    builder: (context) {
+                                      return GestureDetector(
+                                        onTap: () {
+                                          FocusScope.of(context).unfocus();
+                                          FocusManager.instance.primaryFocus
+                                              ?.unfocus();
+                                        },
+                                        child: Padding(
+                                          padding:
+                                              MediaQuery.viewInsetsOf(context),
+                                          child: Container(
+                                            height: 620.0,
+                                            child: FotoboekGridComponentWidget(
+                                              bijKeuze: (fid, url) async {
+                                                _model.createLogoFid = fid;
+                                                _model.createLogoUrl = url;
+                                                safeSetState(() {});
+                                              },
+                                            ),
+                                          ),
+                                        ),
+                                      );
+                                    },
+                                  ).then((value) => safeSetState(() {}));
                                 },
                                 text: FFLocalizations.of(context).getText(
                                   'ml0k1fmv' /* Uit fotoboek */,
@@ -3035,143 +3062,19 @@ class _UitgaansevenementAanmakenWidgetState
                                   mainAxisSize: MainAxisSize.max,
                                   children: [
                                     Expanded(
-                                      child: FutureBuilder<ApiCallResponse>(
-                                        future: MijnFotosCall.call(
-                                          sessionName:
-                                              FFAppState().userSessionname,
-                                          sessid: FFAppState().userSessionid,
-                                        ),
-                                        builder: (context, snapshot) {
-                                          // Customize what your widget looks like when it's loading.
-                                          if (!snapshot.hasData) {
-                                            return Center(
-                                              child: SizedBox(
-                                                width: 80.0,
-                                                height: 80.0,
-                                                child: SpinKitFadingCircle(
-                                                  color: FlutterFlowTheme.of(
-                                                          context)
-                                                      .primary,
-                                                  size: 80.0,
-                                                ),
-                                              ),
-                                            );
-                                          }
-                                          final gridViewMijnFotosResponse =
-                                              snapshot.data!;
-                                          _model.debugBackendQueries[
-                                                  'MijnFotosCall_statusCode_GridView_pu3jv77b'] =
-                                              debugSerializeParam(
-                                            gridViewMijnFotosResponse
-                                                .statusCode,
-                                            ParamType.int,
-                                            link:
-                                                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=uitgaansevenementAanmaken',
-                                            name: 'int',
-                                            nullable: false,
-                                          );
-                                          _model.debugBackendQueries[
-                                                  'MijnFotosCall_responseBody_GridView_pu3jv77b'] =
-                                              debugSerializeParam(
-                                            gridViewMijnFotosResponse.bodyText,
-                                            ParamType.String,
-                                            link:
-                                                'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=uitgaansevenementAanmaken',
-                                            name: 'String',
-                                            nullable: false,
-                                          );
-                                          debugLogWidgetClass(_model);
-
-                                          return Builder(
-                                            builder: (context) {
-                                              final fotoboekItem =
-                                                  MijnFotosCall.items(
-                                                        gridViewMijnFotosResponse
-                                                            .jsonBody,
-                                                      )?.toList() ??
-                                                      [];
-                                              if (fotoboekItem.isEmpty) {
-                                                return Center(
-                                                  child:
-                                                      LegeLijstComponentWidget(
-                                                    tekst:
-                                                        'Je hebt nog geen foto\'s. Upload er een met Logo kiezen.',
-                                                  ),
-                                                );
-                                              }
-                                              _model.debugGeneratorVariables[
-                                                      'fotoboekItem${fotoboekItem.length > 100 ? ' (first 100)' : ''}'] =
-                                                  debugSerializeParam(
-                                                fotoboekItem.take(100),
-                                                ParamType.JSON,
-                                                isList: true,
-                                                link:
-                                                    'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=uitgaansevenementAanmaken',
-                                                name: 'dynamic',
-                                                nullable: false,
-                                              );
-                                              debugLogWidgetClass(_model);
-
-                                              return GridView.builder(
-                                                padding: EdgeInsets.zero,
-                                                gridDelegate:
-                                                    SliverGridDelegateWithFixedCrossAxisCount(
-                                                  crossAxisCount: 3,
-                                                  crossAxisSpacing: 10.0,
-                                                  mainAxisSpacing: 10.0,
-                                                  childAspectRatio: 1.0,
-                                                ),
-                                                scrollDirection: Axis.vertical,
-                                                itemCount: fotoboekItem.length,
-                                                itemBuilder: (context,
-                                                    fotoboekItemIndex) {
-                                                  final fotoboekItemItem =
-                                                      fotoboekItem[
-                                                          fotoboekItemIndex];
-                                                  return InkWell(
-                                                    splashColor:
-                                                        Colors.transparent,
-                                                    focusColor:
-                                                        Colors.transparent,
-                                                    hoverColor:
-                                                        Colors.transparent,
-                                                    highlightColor:
-                                                        Colors.transparent,
-                                                    onTap: () async {
-                                                      _model.createLogoFid =
-                                                          getJsonField(
-                                                        fotoboekItemItem,
-                                                        r'''$.fid''',
-                                                      ).toString();
-                                                      _model.createLogoUrl =
-                                                          getJsonField(
-                                                        fotoboekItemItem,
-                                                        r'''$.url''',
-                                                      ).toString();
-                                                      _model.fotoboekOpen =
-                                                          false;
-                                                      safeSetState(() {});
-                                                    },
-                                                    child: ClipRRect(
-                                                      borderRadius:
-                                                          BorderRadius.circular(
-                                                              8.0),
-                                                      child: Image.network(
-                                                        getJsonField(
-                                                          fotoboekItemItem,
-                                                          r'''$.thumb''',
-                                                        ).toString(),
-                                                        width: double.infinity,
-                                                        height: double.infinity,
-                                                        fit: BoxFit.cover,
-                                                      ),
-                                                    ),
-                                                  );
-                                                },
-                                              );
-                                            },
+                                      child: wrapWithModel(
+                                        model:
+                                            _model.fotoboekGridComponentModel,
+                                        updateCallback: () =>
+                                            safeSetState(() {}),
+                                        child: Builder(builder: (_) {
+                                          return DebugFlutterFlowModelContext(
+                                            rootModel: _model.rootModel,
+                                            child: FotoboekGridComponentWidget(
+                                              bijKeuze: (fid, url) async {},
+                                            ),
                                           );
-                                        },
+                                        }),
                                       ),
                                     ),
                                   ],