import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.dart'; import '/shared/tag_categorie_component/tag_categorie_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 'kaart_slider_uitgaan_s_comp_model.dart'; export 'kaart_slider_uitgaan_s_comp_model.dart'; class KaartSliderUitgaanSCompWidget extends StatefulWidget { const KaartSliderUitgaanSCompWidget({ super.key, this.titel, this.datum, this.logo, this.categorie, this.horecagelegenheid, this.adres, this.plaats, }); final String? titel; final String? datum; final String? logo; final List? categorie; final String? horecagelegenheid; final String? adres; final String? plaats; @override State createState() => _KaartSliderUitgaanSCompWidgetState(); } class _KaartSliderUitgaanSCompWidgetState extends State with RouteAware { late KaartSliderUitgaanSCompModel _model; @override void setState(VoidCallback callback) { super.setState(callback); _model.onUpdate(); } @override void initState() { super.initState(); _model = createModel(context, () => KaartSliderUitgaanSCompModel()); } @override void dispose() { routeObserver.unsubscribe(this); _model.maybeDispose(); super.dispose(); } @override void didUpdateWidget(KaartSliderUitgaanSCompWidget 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); _model.tagCategorieComponentModels.clear(); return Column( mainAxisSize: MainAxisSize.max, children: [ Align( alignment: AlignmentDirectional(0.0, -1.0), child: Padding( padding: EdgeInsetsDirectional.fromSTEB(0.0, 8.0, 0.0, 8.0), child: Container( decoration: BoxDecoration(), child: Column( mainAxisSize: MainAxisSize.max, children: [ Text( widget!.titel!, style: FlutterFlowTheme.of(context).titleLarge.override( font: GoogleFonts.interTight( fontWeight: FlutterFlowTheme.of(context).titleLarge.fontWeight, fontStyle: FlutterFlowTheme.of(context).titleLarge.fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context).titleLarge.fontWeight, fontStyle: FlutterFlowTheme.of(context).titleLarge.fontStyle, shadows: [ Shadow( color: FlutterFlowTheme.of(context).secondaryText, offset: Offset(2.0, 2.0), blurRadius: 2.0, ) ], ), ), Wrap( spacing: 0.0, runSpacing: 0.0, alignment: WrapAlignment.start, crossAxisAlignment: WrapCrossAlignment.start, direction: Axis.horizontal, runAlignment: WrapAlignment.start, verticalDirection: VerticalDirection.down, clipBehavior: Clip.none, children: [ Icon( Icons.calendar_month, color: FlutterFlowTheme.of(context).primaryText, size: 24.0, ), Text( widget!.datum!, style: FlutterFlowTheme.of(context).titleMedium.override( font: GoogleFonts.interTight( 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, ), ), ], ), ], ), ), ), ), Align( alignment: AlignmentDirectional(0.0, -1.0), child: Row( mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.start, children: [ Expanded( child: Align( alignment: AlignmentDirectional(1.0, -1.0), child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.only( topLeft: Radius.circular(25.0), bottomLeft: Radius.circular(25.0), ), ), child: Align( alignment: AlignmentDirectional(1.0, -1.0), child: Stack( alignment: AlignmentDirectional(1.0, 0.0), children: [ ClipRRect( borderRadius: BorderRadius.circular(8.0), child: Image.network( widget!.logo!, fit: BoxFit.cover, alignment: Alignment(0.0, 0.0), ), ), Align( alignment: AlignmentDirectional(1.0, 1.0), child: Padding( padding: EdgeInsetsDirectional.fromSTEB( 0.0, 0.0, 15.0, 0.0), child: Builder( builder: (context) { final categorie = widget!.categorie?.toList() ?? []; _model.debugGeneratorVariables[ 'categorie${categorie.length > 100 ? ' (first 100)' : ''}'] = debugSerializeParam( categorie.take(100), ParamType.String, isList: true, link: 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kaartSliderUitgaanSComp', name: 'String', nullable: false, ); debugLogWidgetClass(_model); return Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.start, children: List.generate(categorie.length, (categorieIndex) { final categorieItem = categorie[categorieIndex]; return Align( alignment: AlignmentDirectional(1.0, 1.0), child: Builder(builder: (_) { return DebugFlutterFlowModelContext( rootModel: _model.rootModel, parentModelCallback: (m) { _model.tagCategorieComponentModels[ 'Keygj0_${categorieIndex}_of_${categorie.length}'] = m; }, child: TagCategorieComponentWidget( key: Key( 'Keygj0_${categorieIndex}_of_${categorie.length}'), categorieTag: categorieItem, ), ); }), ); }), ); }, ), ), ), ], ), ), ), ), ), Expanded( child: Container( decoration: BoxDecoration( borderRadius: BorderRadius.only( topRight: Radius.circular(20.0), bottomRight: Radius.circular(20.0), ), ), alignment: AlignmentDirectional(0.0, 0.0), child: Padding( padding: EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 2.0), child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start, children: [ Padding( padding: EdgeInsetsDirectional.fromSTEB( 0.0, 2.0, 0.0, 2.0), child: Row( mainAxisSize: MainAxisSize.max, children: [ Icon( Icons.add_business_sharp, color: FlutterFlowTheme.of(context).primaryText, size: 24.0, ), Align( alignment: AlignmentDirectional(-0.98, -0.42), child: Text( widget!.horecagelegenheid!, style: FlutterFlowTheme.of(context) .bodyMedium .override( font: GoogleFonts.inter( fontWeight: FlutterFlowTheme.of(context) .bodyMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodyMedium .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .bodyMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodyMedium .fontStyle, ), overflow: TextOverflow.ellipsis, ), ), ], ), ), Padding( padding: EdgeInsetsDirectional.fromSTEB( 0.0, 2.0, 0.0, 2.0), child: Wrap( spacing: 0.0, runSpacing: 0.0, alignment: WrapAlignment.start, crossAxisAlignment: WrapCrossAlignment.start, direction: Axis.horizontal, runAlignment: WrapAlignment.start, verticalDirection: VerticalDirection.down, clipBehavior: Clip.none, children: [ Icon( Icons.location_on, color: FlutterFlowTheme.of(context).primaryText, size: 24.0, ), Padding( padding: EdgeInsetsDirectional.fromSTEB( 0.0, 0.0, 6.0, 0.0), child: Text( widget!.adres!, style: FlutterFlowTheme.of(context) .bodyMedium .override( font: GoogleFonts.inter( fontWeight: FlutterFlowTheme.of(context) .bodyMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodyMedium .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .bodyMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodyMedium .fontStyle, ), overflow: TextOverflow.visible, ), ), Text( widget!.plaats!, style: FlutterFlowTheme.of(context) .bodyMedium .override( font: GoogleFonts.inter( fontWeight: FlutterFlowTheme.of(context) .bodyMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodyMedium .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context) .bodyMedium .fontWeight, fontStyle: FlutterFlowTheme.of(context) .bodyMedium .fontStyle, ), overflow: TextOverflow.visible, ), ], ), ), ], ), ), ), ), ], ), ), ], ); } }