import '/backend/api_requests/api_calls.dart'; import '/components/header_buttons_component_widget.dart'; import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import '/horecagelegenhedenoverzicht/horecagelegenheidoverzicht_kaart/horecagelegenheidoverzicht_kaart_widget.dart'; import '/shared/drawer_component/drawer_component_widget.dart'; import 'dart:ui'; import '/custom_code/actions/index.dart' as actions; import '/index.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'horecagelegenheden_overzicht_model.dart'; export 'horecagelegenheden_overzicht_model.dart'; class HorecagelegenhedenOverzichtWidget extends StatefulWidget { const HorecagelegenhedenOverzichtWidget({ super.key, required this.plaats, }); final String? plaats; static String routeName = 'HorecagelegenhedenOverzicht'; static String routePath = '/horecagelegenhedenOverzicht'; @override State createState() => _HorecagelegenhedenOverzichtWidgetState(); } class _HorecagelegenhedenOverzichtWidgetState extends State with TickerProviderStateMixin, RouteAware { late HorecagelegenhedenOverzichtModel _model; final scaffoldKey = GlobalKey(); @override void initState() { super.initState(); _model = createModel(context, () => HorecagelegenhedenOverzichtModel()); // On page load action. SchedulerBinding.instance.addPostFrameCallback((_) async { _model.resultHorecaActiviteiten = await actions.fetchAlleHorecagelegenheden( '17969', widget!.plaats!, 'services_1', ); _model.alleActiviteiten = _model.resultHorecaActiviteiten!.toList().cast(); safeSetState(() {}); }); _model.tabBarController = TabController( vsync: this, length: 6, initialIndex: 0, ) ..addListener(() => safeSetState(() {})) ..addListener(() { debugLogWidgetClass(_model); }); _model.textController1 ??= TextEditingController() ..addListener(() { debugLogWidgetClass(_model); }); _model.textFieldFocusNode1 ??= FocusNode(); _model.textController2 ??= TextEditingController() ..addListener(() { debugLogWidgetClass(_model); }); _model.textFieldFocusNode2 ??= FocusNode(); _model.textController3 ??= TextEditingController() ..addListener(() { debugLogWidgetClass(_model); }); _model.textFieldFocusNode3 ??= FocusNode(); } @override void dispose() { routeObserver.unsubscribe(this); _model.dispose(); super.dispose(); } @override void didUpdateWidget(HorecagelegenhedenOverzichtWidget 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(); _model.horecagelegenheidoverzichtKaartModels1.clear(); _model.horecagelegenheidoverzichtKaartModels3.clear(); _model.horecagelegenheidoverzichtKaartModels4.clear(); _model.horecagelegenheidoverzichtKaartModels5.clear(); _model.horecagelegenheidoverzichtKaartModels6.clear(); return GestureDetector( onTap: () { FocusScope.of(context).unfocus(); FocusManager.instance.primaryFocus?.unfocus(); }, child: Scaffold( key: scaffoldKey, backgroundColor: FlutterFlowTheme.of(context).primaryBackground, drawer: Drawer( elevation: 16.0, child: wrapWithModel( model: _model.drawerComponentModel, updateCallback: () => safeSetState(() {}), child: Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, child: DrawerComponentWidget(), ); }), ), ), appBar: PreferredSize( preferredSize: Size.fromHeight(80.0), child: AppBar( backgroundColor: FlutterFlowTheme.of(context).info, iconTheme: IconThemeData(color: FlutterFlowTheme.of(context).secondary), automaticallyImplyLeading: false, actions: [], flexibleSpace: FlexibleSpaceBar( background: wrapWithModel( model: _model.headerButtonsComponentModel, updateCallback: () => safeSetState(() {}), child: Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, child: HeaderButtonsComponentWidget(), ); }), ), centerTitle: true, expandedTitleScale: 1.0, ), bottom: PreferredSize( preferredSize: Size.fromHeight(70.0), child: Container(), ), toolbarHeight: MediaQuery.sizeOf(context).height * 0.25, elevation: 2.0, ), ), body: SafeArea( top: true, child: Column( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: Container( decoration: BoxDecoration( boxShadow: [ BoxShadow( blurRadius: 4.0, color: Color(0x33000000), offset: Offset( 0.0, 2.0, ), ) ], ), child: Column( children: [ Align( alignment: Alignment(-1.0, 0), child: TabBar( isScrollable: true, tabAlignment: TabAlignment.start, labelColor: FlutterFlowTheme.of(context).primaryText, unselectedLabelColor: FlutterFlowTheme.of(context).secondaryText, labelStyle: FlutterFlowTheme.of(context).titleMedium.override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .titleMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleMedium .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .titleMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleMedium .fontStyle, ), unselectedLabelStyle: FlutterFlowTheme.of(context).titleMedium.override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .titleMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleMedium .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .titleMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleMedium .fontStyle, ), indicatorColor: FlutterFlowTheme.of(context).secondary, tabs: [ Tab( text: FFLocalizations.of(context).getText( 'cfmj0g86' /* Activiteiten */, ), ), Tab( text: FFLocalizations.of(context).getText( 'od4c0ph1' /* Cultuur */, ), ), Tab( text: FFLocalizations.of(context).getText( 'i9cdclh1' /* Eetgelegenheden */, ), ), Tab( text: FFLocalizations.of(context).getText( '9s07bzb1' /* Overnachten */, ), ), Tab( text: FFLocalizations.of(context).getText( 'egcnfi7k' /* Uitgaan */, ), ), Tab( text: FFLocalizations.of(context).getText( '3i8p2r6z' /* Verhuur, catering */, ), ), ], controller: _model.tabBarController, onTap: (i) async { [ () async {}, () async { _model.tabVerhuurcateringGeladen = true; safeSetState(() {}); _model.resultHorecaCultuur = await actions.fetchAlleHorecagelegenheden( '17963', widget!.plaats!, 'services_1', ); _model.alleCultuur = _model.resultHorecaCultuur! .toList() .cast(); safeSetState(() {}); safeSetState(() {}); }, () async { _model.tabEetgelegenhedenGeladen = true; safeSetState(() {}); _model.resultHorecaEetgelegenheden = await actions.fetchAlleHorecagelegenheden( '34', widget!.plaats!, 'services_1', ); _model.alleEetgelegenheden = _model .resultHorecaEetgelegenheden! .toList() .cast(); safeSetState(() {}); safeSetState(() {}); }, () async { _model.tabOvernachtenGeladen = true; safeSetState(() {}); _model.resultHorecaOvernachten = await actions.fetchAlleHorecagelegenheden( '17965', widget!.plaats!, 'services_1', ); _model.alleOvernachten = _model .resultHorecaOvernachten! .toList() .cast(); safeSetState(() {}); safeSetState(() {}); }, () async { _model.tabUitgaanGeladen = true; safeSetState(() {}); _model.resultHorecaUitgaansgelegenheden = await actions.fetchAlleHorecagelegenheden( '17967', widget!.plaats!, 'services_1', ); _model.alleUitgaan = _model .resultHorecaUitgaansgelegenheden! .toList() .cast(); safeSetState(() {}); safeSetState(() {}); }, () async { _model.tabVerhuurcateringGeladen = true; safeSetState(() {}); _model.resultHorecaVerhuur = await actions.fetchAlleHorecagelegenheden( '17968', widget!.plaats!, 'services_1', ); _model.alleVerhuurCatering = _model .resultHorecaVerhuur! .toList() .cast(); safeSetState(() {}); safeSetState(() {}); } ][i](); }, ), ), Expanded( child: TabBarView( controller: _model.tabBarController, children: [ Column( mainAxisSize: MainAxisSize.max, children: [ Container( width: 200.0, child: TextFormField( controller: _model.textController1, focusNode: _model.textFieldFocusNode1, 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( 'zk6al0vg' /* 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.textController1Validator .asValidator(context), ), ), Expanded( child: FutureBuilder( future: HorecagelegenheidoverzichtCall.call( horcat: '17969', townid: widget!.plaats, ), 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 staggeredViewHorecagelegenheidoverzichtResponse = snapshot.data!; _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_ezq3lq60'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_ezq3lq60'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final horecagelegenheden = getJsonField( staggeredViewHorecagelegenheidoverzichtResponse .jsonBody, r'''$''', ).toList().take(25).toList(); _model.debugGeneratorVariables[ 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( horecagelegenheden.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return MasonryGridView.builder( gridDelegate: SliverSimpleGridDelegateWithFixedCrossAxisCount( crossAxisCount: () { if (MediaQuery.sizeOf(context) .width < kBreakpointSmall) { return 1; } else if (MediaQuery.sizeOf( context) .width < kBreakpointMedium) { return 1; } else if (MediaQuery.sizeOf( context) .width < kBreakpointLarge) { return 2; } else { return 3; } }(), ), crossAxisSpacing: 12.0, mainAxisSpacing: 12.0, itemCount: horecagelegenheden.length, itemBuilder: (context, horecagelegenhedenIndex) { final horecagelegenhedenItem = horecagelegenheden[ horecagelegenhedenIndex]; return Container( width: 600.0, height: 225.0, decoration: BoxDecoration( color: FlutterFlowTheme.of( context) .secondaryBackground, ), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { context.pushNamed( HorecagelegenheidCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), ParamType.String, ), }.withoutNulls, ); }, child: Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, parentModelCallback: (m) { _model.horecagelegenheidoverzichtKaartModels1[ 'Keyxu9_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m; }, child: HorecagelegenheidoverzichtKaartWidget( key: Key( 'Keyxu9_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'), titel: getJsonField( horecagelegenhedenItem, r'''$.titel''', ).toString(), logo: getJsonField( horecagelegenhedenItem, r'''$.logo''', ).toString(), nid: getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), adres: getJsonField( horecagelegenhedenItem, r'''$.adres''', ).toString(), plaats: getJsonField( horecagelegenhedenItem, r'''$.plaats''', ).toString(), categorie: (getJsonField( horecagelegenhedenItem, r'''$.categorie''', true, ) as List?) ?.map( (e) => e .toString()) .toList() .cast(), ), ); }), ), ); }, ); }, ); }, ), ), ], ), Column( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: FutureBuilder( future: HorecagelegenheidoverzichtCall.call( horcat: '34', townid: widget!.plaats, ), 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 staggeredViewHorecagelegenheidoverzichtResponse = snapshot.data!; _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_lvufq1md'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_lvufq1md'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return MasonryGridView.builder( gridDelegate: SliverSimpleGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, ), crossAxisSpacing: 10.0, mainAxisSpacing: 10.0, itemCount: 1, itemBuilder: (context, index) { return [ () => Container( width: 100.0, height: 100.0, decoration: BoxDecoration( color: FlutterFlowTheme.of( context) .secondaryBackground, ), child: wrapWithModel( model: _model .horecagelegenheidoverzichtKaartModel2, updateCallback: () => safeSetState(() {}), child: Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, child: HorecagelegenheidoverzichtKaartWidget(), ); }), ), ), ][index](); }, ); }, ), ), Container( width: 200.0, child: TextFormField( controller: _model.textController2, focusNode: _model.textFieldFocusNode2, 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( '4hoz3fa1' /* 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.textController2Validator .asValidator(context), ), ), ], ), Builder( builder: (context) { if (_model.tabEetgelegenhedenGeladen) { return Column( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: FutureBuilder( future: HorecagelegenheidoverzichtCall .call( horcat: '34', townid: widget!.plaats, ), 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 staggeredViewHorecagelegenheidoverzichtResponse = snapshot.data!; _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_n4zm8jsx'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_n4zm8jsx'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final horecagelegenheden = getJsonField( staggeredViewHorecagelegenheidoverzichtResponse .jsonBody, r'''$''', ).toList().take(25).toList(); if (horecagelegenheden .isEmpty) { return Image.asset( 'assets/images/logo800px.png', ); } _model.debugGeneratorVariables[ 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( horecagelegenheden.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return MasonryGridView.builder( gridDelegate: SliverSimpleGridDelegateWithFixedCrossAxisCount( crossAxisCount: () { if (MediaQuery.sizeOf( context) .width < kBreakpointSmall) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointMedium) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointLarge) { return 2; } else { return 3; } }(), ), crossAxisSpacing: 12.0, mainAxisSpacing: 12.0, itemCount: horecagelegenheden.length, itemBuilder: (context, horecagelegenhedenIndex) { final horecagelegenhedenItem = horecagelegenheden[ horecagelegenhedenIndex]; return Container( width: 600.0, height: 225.0, decoration: BoxDecoration( color: FlutterFlowTheme .of(context) .secondaryBackground, ), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { context.pushNamed( HorecagelegenheidCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), ParamType .String, ), }.withoutNulls, ); }, child: Builder( builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model .rootModel, parentModelCallback: (m) { _model.horecagelegenheidoverzichtKaartModels3[ 'Key81b_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m; }, child: HorecagelegenheidoverzichtKaartWidget( key: Key( 'Key81b_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'), titel: getJsonField( horecagelegenhedenItem, r'''$.titel''', ).toString(), logo: getJsonField( horecagelegenhedenItem, r'''$.logo''', ).toString(), nid: getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), adres: getJsonField( horecagelegenhedenItem, r'''$.adres''', ).toString(), plaats: getJsonField( horecagelegenhedenItem, r'''$.plaats''', ).toString(), categorie: (getJsonField( horecagelegenhedenItem, r'''$.categorie''', true, ) as List?) ?.map( (e) => e .toString()) .toList() .cast< String>(), ), ); }), ), ); }, ); }, ); }, ), ), ], ); } else { return Container( width: 100.0, height: 100.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context) .secondaryBackground, ), ); } }, ), Builder( builder: (context) { if (_model.tabOvernachtenGeladen) { return Column( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: FutureBuilder( future: HorecagelegenheidoverzichtCall .call( horcat: '17965', townid: widget!.plaats, ), 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 staggeredViewHorecagelegenheidoverzichtResponse = snapshot.data!; _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_51qs4ew3'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_51qs4ew3'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final horecagelegenheden = getJsonField( staggeredViewHorecagelegenheidoverzichtResponse .jsonBody, r'''$''', ).toList().take(25).toList(); if (horecagelegenheden .isEmpty) { return Image.asset( 'assets/images/logo800px.png', ); } _model.debugGeneratorVariables[ 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( horecagelegenheden.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return MasonryGridView.builder( gridDelegate: SliverSimpleGridDelegateWithFixedCrossAxisCount( crossAxisCount: () { if (MediaQuery.sizeOf( context) .width < kBreakpointSmall) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointMedium) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointLarge) { return 2; } else { return 3; } }(), ), crossAxisSpacing: 12.0, mainAxisSpacing: 12.0, itemCount: horecagelegenheden.length, itemBuilder: (context, horecagelegenhedenIndex) { final horecagelegenhedenItem = horecagelegenheden[ horecagelegenhedenIndex]; return Container( width: 600.0, height: 225.0, decoration: BoxDecoration( color: FlutterFlowTheme .of(context) .secondaryBackground, ), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { context.pushNamed( HorecagelegenheidCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), ParamType .String, ), }.withoutNulls, ); }, child: Builder( builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model .rootModel, parentModelCallback: (m) { _model.horecagelegenheidoverzichtKaartModels4[ 'Keyqfe_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m; }, child: HorecagelegenheidoverzichtKaartWidget( key: Key( 'Keyqfe_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'), titel: getJsonField( horecagelegenhedenItem, r'''$.titel''', ).toString(), logo: getJsonField( horecagelegenhedenItem, r'''$.logo''', ).toString(), nid: getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), adres: getJsonField( horecagelegenhedenItem, r'''$.adres''', ).toString(), plaats: getJsonField( horecagelegenhedenItem, r'''$.plaats''', ).toString(), categorie: (getJsonField( horecagelegenhedenItem, r'''$.categorie''', true, ) as List?) ?.map( (e) => e .toString()) .toList() .cast< String>(), ), ); }), ), ); }, ); }, ); }, ), ), ], ); } else { return Container( width: 100.0, height: 100.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context) .secondaryBackground, ), ); } }, ), Builder( builder: (context) { if (_model.tabUitgaanGeladen) { return Column( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: FutureBuilder( future: HorecagelegenheidoverzichtCall .call( horcat: '17967', townid: FFAppState().provincieSelectId, ), 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 staggeredViewHorecagelegenheidoverzichtResponse = snapshot.data!; _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_2y8hmnf7'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_2y8hmnf7'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final horecagelegenheden = getJsonField( staggeredViewHorecagelegenheidoverzichtResponse .jsonBody, r'''$''', ).toList().take(25).toList(); if (horecagelegenheden .isEmpty) { return Image.asset( 'assets/images/logo800px.png', ); } _model.debugGeneratorVariables[ 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( horecagelegenheden.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return MasonryGridView.builder( gridDelegate: SliverSimpleGridDelegateWithFixedCrossAxisCount( crossAxisCount: () { if (MediaQuery.sizeOf( context) .width < kBreakpointSmall) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointMedium) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointLarge) { return 2; } else { return 3; } }(), ), crossAxisSpacing: 12.0, mainAxisSpacing: 12.0, itemCount: horecagelegenheden.length, itemBuilder: (context, horecagelegenhedenIndex) { final horecagelegenhedenItem = horecagelegenheden[ horecagelegenhedenIndex]; return Container( width: 600.0, height: 225.0, decoration: BoxDecoration( color: FlutterFlowTheme .of(context) .secondaryBackground, ), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { context.pushNamed( HorecagelegenheidCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), ParamType .String, ), }.withoutNulls, ); }, child: Builder( builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model .rootModel, parentModelCallback: (m) { _model.horecagelegenheidoverzichtKaartModels5[ 'Key81q_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m; }, child: HorecagelegenheidoverzichtKaartWidget( key: Key( 'Key81q_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'), titel: getJsonField( horecagelegenhedenItem, r'''$.titel''', ).toString(), logo: getJsonField( horecagelegenhedenItem, r'''$.logo''', ).toString(), nid: getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), adres: getJsonField( horecagelegenhedenItem, r'''$.adres''', ).toString(), plaats: getJsonField( horecagelegenhedenItem, r'''$.plaats''', ).toString(), categorie: (getJsonField( horecagelegenhedenItem, r'''$.categorie''', true, ) as List?) ?.map( (e) => e .toString()) .toList() .cast< String>(), ), ); }), ), ); }, ); }, ); }, ), ), ], ); } else { return Container( width: 100.0, height: 100.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context) .secondaryBackground, ), ); } }, ), Builder( builder: (context) { if (_model.tabVerhuurcateringGeladen) { return Column( mainAxisSize: MainAxisSize.max, children: [ Expanded( child: FutureBuilder( future: HorecagelegenheidoverzichtCall .call( horcat: '17968', townid: widget!.plaats, ), 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 staggeredViewHorecagelegenheidoverzichtResponse = snapshot.data!; _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_9f73d118'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_9f73d118'] = debugSerializeParam( staggeredViewHorecagelegenheidoverzichtResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final horecagelegenheden = getJsonField( staggeredViewHorecagelegenheidoverzichtResponse .jsonBody, r'''$''', ).toList().take(25).toList(); if (horecagelegenheden .isEmpty) { return Image.asset( 'assets/images/logo800px.png', ); } _model.debugGeneratorVariables[ 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( horecagelegenheden.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return MasonryGridView.builder( gridDelegate: SliverSimpleGridDelegateWithFixedCrossAxisCount( crossAxisCount: () { if (MediaQuery.sizeOf( context) .width < kBreakpointSmall) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointMedium) { return 1; } else if (MediaQuery .sizeOf( context) .width < kBreakpointLarge) { return 2; } else { return 3; } }(), ), crossAxisSpacing: 12.0, mainAxisSpacing: 12.0, itemCount: horecagelegenheden.length, itemBuilder: (context, horecagelegenhedenIndex) { final horecagelegenhedenItem = horecagelegenheden[ horecagelegenhedenIndex]; return Container( width: 600.0, height: 225.0, decoration: BoxDecoration( color: FlutterFlowTheme .of(context) .secondaryBackground, ), child: InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { context.pushNamed( HorecagelegenheidCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), ParamType .String, ), }.withoutNulls, ); }, child: Builder( builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model .rootModel, parentModelCallback: (m) { _model.horecagelegenheidoverzichtKaartModels6[ 'Keykrk_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m; }, child: HorecagelegenheidoverzichtKaartWidget( key: Key( 'Keykrk_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'), titel: getJsonField( horecagelegenhedenItem, r'''$.titel''', ).toString(), logo: getJsonField( horecagelegenhedenItem, r'''$.logo''', ).toString(), nid: getJsonField( horecagelegenhedenItem, r'''$.nid''', ).toString(), adres: getJsonField( horecagelegenhedenItem, r'''$.adres''', ).toString(), plaats: getJsonField( horecagelegenhedenItem, r'''$.plaats''', ).toString(), categorie: (getJsonField( horecagelegenhedenItem, r'''$.categorie''', true, ) as List?) ?.map( (e) => e .toString()) .toList() .cast< String>(), ), ); }), ), ); }, ); }, ); }, ), ), ], ); } else { return Container( width: 100.0, height: 100.0, decoration: BoxDecoration( color: FlutterFlowTheme.of(context) .secondaryBackground, ), ); } }, ), ], ), ), ], ), ), ), Container( width: 200.0, child: TextFormField( controller: _model.textController3, focusNode: _model.textFieldFocusNode3, 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( 'w8fjvz5a' /* 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.textController3Validator.asValidator(context), ), ), ], ), ), ), ); } }