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 '/shared/lege_lijst_component/lege_lijst_component_widget.dart'; import 'dart:ui'; import '/flutter_flow/custom_functions.dart' as functions; import '/index.dart'; import 'package:flutter/material.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_spinkit/flutter_spinkit.dart'; import 'package:google_fonts/google_fonts.dart'; import 'package:provider/provider.dart'; import 'mijn_profiel_copy4_model.dart'; export 'mijn_profiel_copy4_model.dart'; class MijnProfielCopy4Widget extends StatefulWidget { const MijnProfielCopy4Widget({super.key}); static String routeName = 'mijnProfielCopy4'; static String routePath = '/mijnProfielCopy4'; @override State createState() => _MijnProfielCopy4WidgetState(); } class _MijnProfielCopy4WidgetState extends State with TickerProviderStateMixin, RouteAware { late MijnProfielCopy4Model _model; final scaffoldKey = GlobalKey(); @override void initState() { super.initState(); _model = createModel(context, () => MijnProfielCopy4Model()); // On page load action. SchedulerBinding.instance.addPostFrameCallback((_) async { _model.apiResultvpn = await MijnHorecagelegenhedenCall.call( sessionName: FFAppState().userSessionname, sessid: FFAppState().userSessionid, ); if ((_model.apiResultvpn?.succeeded ?? true)) { _model.mijnHorecaRespons = (_model.apiResultvpn?.jsonBody ?? '').toList().cast(); safeSetState(() {}); } }); _model.tabBarmijnevenementenController = TabController( vsync: this, length: 4, initialIndex: 0, ) ..addListener(() => safeSetState(() {})) ..addListener(() { debugLogWidgetClass(_model); }); } @override void dispose() { routeObserver.unsubscribe(this); _model.dispose(); super.dispose(); } @override void didUpdateWidget(MijnProfielCopy4Widget 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.horecagelegenheidoverzichtKaartModels.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).primaryText, automaticallyImplyLeading: false, actions: [], flexibleSpace: FlexibleSpaceBar( background: wrapWithModel( model: _model.headerButtonsComponentModel, updateCallback: () => safeSetState(() {}), child: Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, child: HeaderButtonsComponentWidget( showBackButton: true, ), ); }), ), 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: Padding( padding: EdgeInsets.all(16.0), child: Column( mainAxisSize: MainAxisSize.max, children: [ SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, children: [ Padding( padding: EdgeInsets.all(16.0), child: Text( FFAppState().userName, 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, ), ), ), InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { context.pushNamed(WachtwoordVergetenWidget.routeName); }, child: Material( color: Colors.transparent, child: ListTile( title: Text( FFLocalizations.of(context).getText( 'l6uay90d' /* Wachtwoord wijzigen */, ), style: FlutterFlowTheme.of(context) .titleLarge .override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleLarge .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleLarge .fontStyle, ), ), trailing: Icon( Icons.arrow_forward_ios_rounded, color: FlutterFlowTheme.of(context).secondaryText, size: 24.0, ), tileColor: FlutterFlowTheme.of(context) .secondaryBackground, dense: false, contentPadding: EdgeInsetsDirectional.fromSTEB( 12.0, 0.0, 12.0, 0.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), ), ), InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await launchURL( 'https://uitgaanskrant.com/nl/support/mobieleapp'); }, child: Material( color: Colors.transparent, child: ListTile( title: Text( FFLocalizations.of(context).getText( '7y2g23h5' /* Account verwijderen */, ), style: FlutterFlowTheme.of(context) .titleLarge .override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleLarge .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleLarge .fontStyle, ), ), trailing: Icon( Icons.arrow_forward_ios_rounded, color: FlutterFlowTheme.of(context).secondaryText, size: 24.0, ), tileColor: FlutterFlowTheme.of(context) .secondaryBackground, dense: false, contentPadding: EdgeInsetsDirectional.fromSTEB( 12.0, 0.0, 12.0, 0.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), ), ), InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { FFAppState().deleteUserToken(); FFAppState().userToken = ''; FFAppState().deleteUserSessionid(); FFAppState().userSessionid = ''; FFAppState().deleteUserSessionname(); FFAppState().userSessionname = ''; FFAppState().deleteUserName(); FFAppState().userName = ''; FFAppState().deleteUserUid(); FFAppState().userUid = 0; FFAppState().deleteUserMail(); FFAppState().userMail = ''; safeSetState(() {}); context.goNamed(LoginWidget.routeName); }, child: Material( color: Colors.transparent, child: ListTile( title: Text( FFLocalizations.of(context).getText( 'twwekzbi' /* Uitloggen */, ), style: FlutterFlowTheme.of(context) .titleLarge .override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleLarge .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .titleLarge .fontStyle, ), ), trailing: Icon( Icons.arrow_forward_ios_rounded, color: FlutterFlowTheme.of(context).secondaryText, size: 24.0, ), tileColor: FlutterFlowTheme.of(context) .secondaryBackground, dense: false, contentPadding: EdgeInsetsDirectional.fromSTEB( 12.0, 0.0, 12.0, 0.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8.0), ), ), ), ), ], ), ), Expanded( child: Column( children: [ Align( alignment: Alignment(0.0, 0), child: TabBar( isScrollable: true, tabAlignment: TabAlignment.center, 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( 'pb6norml' /* Mijn evenementen */, ), ), Tab( text: FFLocalizations.of(context).getText( 'xg73samc' /* Stadseditor */, ), ), Tab( text: FFLocalizations.of(context).getText( '44khw1se' /* Account */, ), ), Tab( text: FFLocalizations.of(context).getText( 'cbpf2ypy' /* Tab 4 */, ), ), ], controller: _model.tabBarmijnevenementenController, onTap: (i) async { [ () async {}, () async {}, () async {}, () async {} ][i](); }, ), ), Expanded( child: TabBarView( controller: _model.tabBarmijnevenementenController, children: [ SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, children: [ if (_model.mijnHorecaRespons.isNotEmpty) Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( FFLocalizations.of(context).getText( 'p1789zud' /* Komende evenementen */, ), style: 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, ), ), FFButtonWidget( onPressed: () async { context.pushNamed( MijnAanmeldingenWidget.routeName, queryParameters: { 'type': serializeParam( 'go_out_event', ParamType.String, ), }.withoutNulls, ); }, text: FFLocalizations.of(context) .getText( 'mkoquw3y' /* Bekijk alles */, ), 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), ), ), ], ), if (_model.mijnHorecaRespons.isNotEmpty) FutureBuilder( future: MijnAanmeldingenCall.call( sessionName: FFAppState().userSessionname, sessid: FFAppState().userSessionid, limit: 5, type: 'go_out_event', komend: '1', ), 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 listViewMijnAanmeldingenResponse = snapshot.data!; _model.debugBackendQueries[ 'MijnAanmeldingenCall_statusCode_ListView_cuva7pps'] = debugSerializeParam( listViewMijnAanmeldingenResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'MijnAanmeldingenCall_responseBody_ListView_cuva7pps'] = debugSerializeParam( listViewMijnAanmeldingenResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final aanmeldingItem = MijnAanmeldingenCall.items( listViewMijnAanmeldingenResponse .jsonBody, )?.toList() ?? []; if (aanmeldingItem.isEmpty) { return LegeLijstComponentWidget( tekst: 'Je hebt nog geen komende evenementen aangemaakt. Hiervoor moet je eigenaar zijn van een horecagelegenheid.', ); } _model.debugGeneratorVariables[ 'aanmeldingItem${aanmeldingItem.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( aanmeldingItem.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return ListView.builder( padding: EdgeInsets.zero, shrinkWrap: true, scrollDirection: Axis.vertical, itemCount: aanmeldingItem.length, itemBuilder: (context, aanmeldingItemIndex) { final aanmeldingItemItem = aanmeldingItem[ aanmeldingItemIndex]; return Column( mainAxisSize: MainAxisSize.max, children: [ InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { if (functions .isOngepubliceerd( aanmeldingItemItem)) { ScaffoldMessenger.of( context) .showSnackBar( SnackBar( content: Text( 'Dit item staat nog in beoordeling en is nog niet online.', style: TextStyle( color: FlutterFlowTheme.of( context) .primaryText, ), ), duration: Duration( milliseconds: 4000), backgroundColor: FlutterFlowTheme.of( context) .secondary, ), ); } else { context.pushNamed( EventCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( aanmeldingItemItem, r'''$.nid''', ).toString(), ParamType .String, ), }.withoutNulls, ); } }, child: Material( color: Colors.transparent, child: ListTile( title: Text( getJsonField( aanmeldingItemItem, r'''$.title''', ).toString(), style: FlutterFlowTheme .of(context) .titleLarge .override( font: GoogleFonts .roboto( fontWeight: FlutterFlowTheme.of( context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of( context) .titleLarge .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of( context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of( context) .titleLarge .fontStyle, ), ), subtitle: Text( getJsonField( aanmeldingItemItem, r'''$.datum_start''', ).toString(), style: 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, ), ), trailing: Icon( Icons .arrow_forward_ios_rounded, color: FlutterFlowTheme .of(context) .secondaryText, size: 24.0, ), tileColor: FlutterFlowTheme .of(context) .secondaryBackground, dense: false, contentPadding: EdgeInsetsDirectional .fromSTEB( 12.0, 0.0, 12.0, 0.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius .circular( 8.0), ), ), ), ), FFButtonWidget( onPressed: () async { _model.apiResultmls = await AanmeldingKloonbronCall .call( sessionName: FFAppState() .userSessionname, sessid: FFAppState() .userSessionid, nid: getJsonField( aanmeldingItemItem, r'''$.nid''', ).toString(), ); if ((_model.apiResultmls ?.succeeded ?? true)) { FFAppState() .kloonBron = (_model .apiResultmls ?.jsonBody ?? ''); safeSetState(() {}); context.pushNamed( UitgaansevenementAanmakenWidget .routeName, queryParameters: { 'horecagelegenheidNid': serializeParam( getJsonField( aanmeldingItemItem, r'''$.horecagelegenheidnid''', ).toString(), ParamType .String, ), }.withoutNulls, ); } safeSetState(() {}); }, text: FFLocalizations.of( context) .getText( 'u6r6mmfb' /* Kopie */, ), 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) .primary, 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), ), ), ], ); }, ); }, ); }, ), Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( FFLocalizations.of(context).getText( 'tn5cqdum' /* Mijn horecagelegenheden */, ), style: 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, ), ), FFButtonWidget( onPressed: () async { await launchURL( 'https://uitgaanskrant.com/en/ondernemers#aanmaken'); }, text: FFLocalizations.of(context).getText( 'xb2fb8g8' /* Zaak toevoegen */, ), 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), ), ), ], ), FutureBuilder( future: MijnHorecagelegenhedenCall.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 listViewMijnHorecagelegenhedenResponse = snapshot.data!; _model.debugBackendQueries[ 'MijnHorecagelegenhedenCall_statusCode_ListView_s88shw3y'] = debugSerializeParam( listViewMijnHorecagelegenhedenResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'MijnHorecagelegenhedenCall_responseBody_ListView_s88shw3y'] = debugSerializeParam( listViewMijnHorecagelegenhedenResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final horecaItem = listViewMijnHorecagelegenhedenResponse .jsonBody .toList(); if (horecaItem.isEmpty) { return LegeLijstComponentWidget( tekst: 'Je hebt geen horecagelegenheden. Deze kun je gratis aanmaken op de uitgaanskrant.com website.', ); } _model.debugGeneratorVariables[ 'horecaItem${horecaItem.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( horecaItem.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return ListView.builder( padding: EdgeInsets.zero, shrinkWrap: true, scrollDirection: Axis.vertical, itemCount: horecaItem.length, itemBuilder: (context, horecaItemIndex) { final horecaItemItem = horecaItem[horecaItemIndex]; return Column( mainAxisSize: MainAxisSize.max, children: [ Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, parentModelCallback: (m) { _model.horecagelegenheidoverzichtKaartModels[ 'Keyqqf_${horecaItemIndex}_of_${horecaItem.length}'] = m; }, child: HorecagelegenheidoverzichtKaartWidget( key: Key( 'Keyqqf_${horecaItemIndex}_of_${horecaItem.length}'), titel: getJsonField( horecaItemItem, r'''$.titel''', ).toString(), logo: getJsonField( horecaItemItem, r'''$.logo''', ).toString(), nid: getJsonField( horecaItemItem, r'''$.nid''', ).toString(), adres: getJsonField( horecaItemItem, r'''$.adres''', ).toString(), plaats: getJsonField( horecaItemItem, r'''$.plaats''', ).toString(), categorie: (getJsonField( horecaItemItem, r'''$.categorie''', true, ) as List?) ?.map( (e) => e .toString()) .toList() .cast(), ), ); }), FFButtonWidget( onPressed: () async { context.pushNamed( UitgaansevenementAanmakenWidget .routeName, queryParameters: { 'horecagelegenheidNid': serializeParam( getJsonField( horecaItemItem, r'''$.nid''', ).toString(), ParamType.String, ), }.withoutNulls, ); }, text: FFLocalizations.of( context) .getText( 'x9pt12s1' /* + Evenement aanmaken */, ), options: FFButtonOptions( width: double.infinity, 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), ), ), ], ); }, ); }, ); }, ), Text( FFLocalizations.of(context).getText( '9wjo1lhh' /* Een horecagelegenheid toevoege... */, ), style: FlutterFlowTheme.of(context) .bodySmall .override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .bodySmall .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodySmall .fontStyle, ), color: FlutterFlowTheme.of(context) .secondaryText, letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .bodySmall .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodySmall .fontStyle, ), ), ], ), ), SingleChildScrollView( child: Column( mainAxisSize: MainAxisSize.max, children: [ Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( FFLocalizations.of(context).getText( 'j9q9tc04' /* Eigen activiteiten */, ), style: 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, ), ), FFButtonWidget( onPressed: () async { context.pushNamed( MijnAanmeldingenWidget.routeName, queryParameters: { 'type': serializeParam( 'activity', ParamType.String, ), }.withoutNulls, ); }, text: FFLocalizations.of(context).getText( '42wjk5cx' /* Bekijk alles */, ), 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), ), ), ], ), FutureBuilder( future: MijnAanmeldingenCall.call( sessionName: FFAppState().userSessionname, sessid: FFAppState().userSessionid, limit: 5, type: 'activity', komend: '1', ), 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 listViewMijnAanmeldingenResponse = snapshot.data!; _model.debugBackendQueries[ 'MijnAanmeldingenCall_statusCode_ListView_j44vfem4'] = debugSerializeParam( listViewMijnAanmeldingenResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'MijnAanmeldingenCall_responseBody_ListView_j44vfem4'] = debugSerializeParam( listViewMijnAanmeldingenResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final aanmeldingItem = MijnAanmeldingenCall.items( listViewMijnAanmeldingenResponse .jsonBody, )?.toList() ?? []; if (aanmeldingItem.isEmpty) { return LegeLijstComponentWidget( tekst: 'Je hebt nog geen komende stadsactiviteiten aangemaakt.', ); } _model.debugGeneratorVariables[ 'aanmeldingItem${aanmeldingItem.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( aanmeldingItem.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return ListView.builder( padding: EdgeInsets.zero, shrinkWrap: true, scrollDirection: Axis.vertical, itemCount: aanmeldingItem.length, itemBuilder: (context, aanmeldingItemIndex) { final aanmeldingItemItem = aanmeldingItem[ aanmeldingItemIndex]; return Column( mainAxisSize: MainAxisSize.max, children: [ InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { if (functions .isOngepubliceerd( aanmeldingItemItem)) { ScaffoldMessenger.of( context) .showSnackBar( SnackBar( content: Text( 'Dit item staat nog in beoordeling en is nog niet online.', style: TextStyle( color: FlutterFlowTheme.of( context) .primaryText, ), ), duration: Duration( milliseconds: 4000), backgroundColor: FlutterFlowTheme.of( context) .secondary, ), ); } else { context.pushNamed( EventCurrentWidget .routeName, queryParameters: { 'nid': serializeParam( getJsonField( aanmeldingItemItem, r'''$.nid''', ).toString(), ParamType.String, ), 'horecaid': serializeParam( getJsonField( aanmeldingItemItem, r'''$.horecagelegenheidnid''', ).toString(), ParamType.String, ), }.withoutNulls, ); } }, child: Material( color: Colors.transparent, child: ListTile( title: Text( getJsonField( aanmeldingItemItem, r'''$.title''', ).toString(), style: FlutterFlowTheme .of(context) .titleLarge .override( font: GoogleFonts .roboto( fontWeight: FlutterFlowTheme.of( context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of( context) .titleLarge .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of( context) .titleLarge .fontWeight, fontStyle: FlutterFlowTheme.of( context) .titleLarge .fontStyle, ), ), subtitle: Text( getJsonField( aanmeldingItemItem, r'''$.datum_start''', ).toString(), style: 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, ), ), trailing: Icon( Icons .arrow_forward_ios_rounded, color: FlutterFlowTheme .of(context) .secondaryText, size: 24.0, ), tileColor: FlutterFlowTheme .of(context) .secondaryBackground, dense: false, contentPadding: EdgeInsetsDirectional .fromSTEB( 12.0, 0.0, 12.0, 0.0), shape: RoundedRectangleBorder( borderRadius: BorderRadius .circular( 8.0), ), ), ), ), FFButtonWidget( onPressed: () async { _model.apiResultAct = await AanmeldingKloonbronCall .call( sessionName: FFAppState() .userSessionname, sessid: FFAppState() .userSessionid, nid: getJsonField( aanmeldingItemItem, r'''$.nid''', ).toString(), ); if ((_model.apiResultAct ?.succeeded ?? true)) { FFAppState() .kloonBron = (_model .apiResultAct ?.jsonBody ?? ''); safeSetState(() {}); context.pushNamed( StadsactiviteitAanmakenWidget .routeName); } safeSetState(() {}); }, text: FFLocalizations.of( context) .getText( 'gvv1wg45' /* Kopie */, ), 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) .primary, 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), ), ), ], ); }, ); }, ); }, ), Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Text( FFLocalizations.of(context).getText( 'pjn3obdr' /* Mijn gemeenten (stadsrechten) */, ), style: 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, ), ), FFButtonWidget( onPressed: () async { context.pushNamed( StadsactiviteitAanmakenWidget .routeName); }, text: FFLocalizations.of(context).getText( '8lo2kanm' /* + Activiteit */, ), 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), ), ), ], ), FutureBuilder( future: MijnStadsrechtenCall.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 listViewMijnStadsrechtenResponse = snapshot.data!; _model.debugBackendQueries[ 'MijnStadsrechtenCall_statusCode_ListView_03gqlhhi'] = debugSerializeParam( listViewMijnStadsrechtenResponse .statusCode, ParamType.int, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'int', nullable: false, ); _model.debugBackendQueries[ 'MijnStadsrechtenCall_responseBody_ListView_03gqlhhi'] = debugSerializeParam( listViewMijnStadsrechtenResponse .bodyText, ParamType.String, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Builder( builder: (context) { final rechtItem = listViewMijnStadsrechtenResponse .jsonBody .toList(); if (rechtItem.isEmpty) { return LegeLijstComponentWidget( tekst: 'Je hebt geen rechten als stadseditor. Je kunt wel activiteiten toevoegen, maar ze moeten eerst worden goedgekeurd door Uitgaanskrant.com.', ); } _model.debugGeneratorVariables[ 'rechtItem${rechtItem.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( rechtItem.take(100), ParamType.JSON, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=mijnProfielCopy4', name: 'dynamic', nullable: false, ); debugLogWidgetClass(_model); return ListView.builder( padding: EdgeInsets.zero, shrinkWrap: true, scrollDirection: Axis.vertical, itemCount: rechtItem.length, itemBuilder: (context, rechtItemIndex) { final rechtItemItem = rechtItem[rechtItemIndex]; return Padding( padding: EdgeInsets.all(12.0), child: Container( decoration: BoxDecoration( color: FlutterFlowTheme.of( context) .secondaryBackground, borderRadius: BorderRadius.circular( 8.0), ), child: Column( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment .start, children: [ Text( '${getJsonField( rechtItemItem, r'''$.titel''', ).toString()} — ${getJsonField( rechtItemItem, r'''$.parent_titel''', ).toString()}', 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, ), ), FFButtonWidget( onPressed: () async { context.pushNamed( StadsactiviteitAanmakenWidget .routeName, queryParameters: { 'gemeenteTid': serializeParam( getJsonField( rechtItemItem, r'''$.tid''', ).toString(), ParamType .String, ), }.withoutNulls, ); }, text: FFLocalizations.of( context) .getText( 'wj5cpfa3' /* + Activiteit aanmaken */, ), options: FFButtonOptions( width: double.infinity, 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), ), ), ], ), ), ); }, ); }, ); }, ), ], ), ), Container(), Container(), ], ), ), ], ), ), ], ), ), ), ), ); } }