import '/flutter_flow/flutter_flow_theme.dart'; import '/flutter_flow/flutter_flow_util.dart'; import '/flutter_flow/flutter_flow_widgets.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 'evenement_info_model.dart'; export 'evenement_info_model.dart'; class EvenementInfoWidget extends StatefulWidget { const EvenementInfoWidget({ super.key, this.nid, this.fotoos, this.title, this.date, this.categories, this.adres, this.plaats, this.entreetoelichting, this.entreeprijs, this.website, this.contact, this.logo, }); final String? nid; final List? fotoos; final String? title; final String? date; final List? categories; final String? adres; final String? plaats; final String? entreetoelichting; final String? entreeprijs; final String? website; final String? contact; final String? logo; @override State createState() => _EvenementInfoWidgetState(); } class _EvenementInfoWidgetState extends State with RouteAware { late EvenementInfoModel _model; @override void setState(VoidCallback callback) { super.setState(callback); _model.onUpdate(); } @override void initState() { super.initState(); _model = createModel(context, () => EvenementInfoModel()); } @override void dispose() { routeObserver.unsubscribe(this); _model.maybeDispose(); super.dispose(); } @override void didUpdateWidget(EvenementInfoWidget 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); return SingleChildScrollView( primary: false, child: Column( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end, children: [ Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, children: [ Column( mainAxisSize: MainAxisSize.max, children: [ Text( valueOrDefault( widget!.adres, 'Adres onbekend', ), 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, ), ), Text( valueOrDefault( widget!.plaats, 'Plaats onbekend', ), 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, ), ), ], ), ], ), Row( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.center, children: [ Text( FFLocalizations.of(context).getText( 'gpbaiwi9' /* Entree: */, ), textAlign: TextAlign.center, style: FlutterFlowTheme.of(context).headlineLarge.override( font: GoogleFonts.roboto( fontWeight: FlutterFlowTheme.of(context) .headlineLarge .fontWeight, fontStyle: FlutterFlowTheme.of(context) .headlineLarge .fontStyle, ), letterSpacing: 0.0, fontWeight: FlutterFlowTheme.of(context).headlineLarge.fontWeight, fontStyle: FlutterFlowTheme.of(context).headlineLarge.fontStyle, ), ), Column( mainAxisSize: MainAxisSize.min, children: [ if (widget!.entreeprijs != null && widget!.entreeprijs != '') Text( valueOrDefault( widget!.entreeprijs, 'Prijs onbekend', ), 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, ), ), if (widget!.entreetoelichting != null && widget!.entreetoelichting != '') Text( valueOrDefault( widget!.entreetoelichting, 'Geen toelichting', ), 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, ), ), ], ), ], ), if (widget!.website != null && widget!.website != '') InkWell( splashColor: Colors.transparent, focusColor: Colors.transparent, hoverColor: Colors.transparent, highlightColor: Colors.transparent, onTap: () async { await launchURL(widget!.website!); }, child: Text( valueOrDefault( widget!.website, 'website', ), 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, ), ), ), if (widget!.contact != null && widget!.contact != '') Text( valueOrDefault( widget!.contact, 'Contact onbekend', ), 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, ), ), ], ), ); } }