| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590 |
- 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 '/index.dart';
- import 'package:auto_size_text/auto_size_text.dart';
- import 'package:cached_network_image/cached_network_image.dart';
- import 'package:flutter/material.dart';
- import 'package:flutter_blurhash/flutter_blurhash.dart';
- import 'package:flutter_spinkit/flutter_spinkit.dart';
- import 'package:google_fonts/google_fonts.dart';
- import 'package:octo_image/octo_image.dart';
- import 'package:provider/provider.dart';
- import 'uitgaantabel_kaart_model.dart';
- export 'uitgaantabel_kaart_model.dart';
- class UitgaantabelKaartWidget extends StatefulWidget {
- const UitgaantabelKaartWidget({
- super.key,
- this.logo,
- this.categorie,
- this.titel,
- this.horecagelegenheid,
- this.adres,
- this.plaats,
- this.datum,
- this.inhoud,
- this.nid,
- this.horecagelegenheidNid,
- });
- final dynamic logo;
- final dynamic categorie;
- final dynamic titel;
- final dynamic horecagelegenheid;
- final dynamic adres;
- final dynamic plaats;
- final dynamic datum;
- final dynamic inhoud;
- final dynamic nid;
- final dynamic horecagelegenheidNid;
- @override
- State<UitgaantabelKaartWidget> createState() =>
- _UitgaantabelKaartWidgetState();
- }
- class _UitgaantabelKaartWidgetState extends State<UitgaantabelKaartWidget>
- with RouteAware {
- late UitgaantabelKaartModel _model;
- @override
- void setState(VoidCallback callback) {
- super.setState(callback);
- _model.onUpdate();
- }
- @override
- void initState() {
- super.initState();
- _model = createModel(context, () => UitgaantabelKaartModel());
- }
- @override
- void dispose() {
- routeObserver.unsubscribe(this);
- _model.maybeDispose();
- super.dispose();
- }
- @override
- void didUpdateWidget(UitgaantabelKaartWidget 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 Padding(
- padding: EdgeInsetsDirectional.fromSTEB(12.0, 12.0, 12.0, 12.0),
- child: InkWell(
- splashColor: Colors.transparent,
- focusColor: Colors.transparent,
- hoverColor: Colors.transparent,
- highlightColor: Colors.transparent,
- onTap: () async {
- context.pushNamed(
- EventCurrentWidget.routeName,
- queryParameters: {
- 'nid': serializeParam(
- widget!.nid?.toString(),
- ParamType.String,
- ),
- 'horecaid': serializeParam(
- widget!.horecagelegenheidNid?.toString(),
- ParamType.String,
- ),
- }.withoutNulls,
- );
- },
- child: Container(
- height: () {
- if (MediaQuery.sizeOf(context).width < kBreakpointSmall) {
- return 160.0;
- } else if (MediaQuery.sizeOf(context).width < kBreakpointMedium) {
- return 200.0;
- } else if (MediaQuery.sizeOf(context).width < kBreakpointLarge) {
- return 240.0;
- } else {
- return 280.0;
- }
- }(),
- decoration: BoxDecoration(
- color: Colors.white,
- boxShadow: [
- BoxShadow(
- blurRadius: 4.0,
- color: Color(0x33000000),
- offset: Offset(
- 0.0,
- 2.0,
- ),
- )
- ],
- borderRadius: BorderRadius.only(
- topLeft: Radius.circular(12.0),
- topRight: Radius.circular(12.0),
- bottomLeft: Radius.circular(12.0),
- bottomRight: Radius.circular(12.0),
- ),
- ),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Expanded(
- flex: 3,
- child: Container(
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).secondaryBackground,
- ),
- child: Stack(
- children: [
- Align(
- alignment: AlignmentDirectional(0.0, 1.0),
- child: Builder(
- builder: (context) {
- if (widget!.logo != null) {
- return ClipRRect(
- borderRadius: BorderRadius.circular(8.0),
- child: OctoImage(
- placeholderBuilder: (_) {
- final blurHash =
- 'L6PZfSi_.AyE_3t7t7R**0o#DgR4';
- if (!validateBlurhash(blurHash)) {
- return const SizedBox.shrink();
- }
- return SizedBox.expand(
- child: Image(
- image: BlurHashImage(blurHash),
- fit: BoxFit.cover,
- ),
- );
- },
- image: CachedNetworkImageProvider(
- widget!.logo!.toString(),
- ),
- width: double.infinity,
- height: double.infinity,
- fit: BoxFit.fitHeight,
- ),
- );
- } else {
- return Icon(
- Icons.image_not_supported,
- color: FlutterFlowTheme.of(context).primaryText,
- size: 24.0,
- );
- }
- },
- ),
- ),
- Align(
- alignment: AlignmentDirectional(-0.92, 0.76),
- child: Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 8.0, 4.0, 8.0, 4.0),
- child: Container(
- decoration: BoxDecoration(),
- child: Builder(
- builder: (context) {
- final categorieitem =
- widget!.categorie?.toList() ?? [];
- _model.debugGeneratorVariables[
- 'categorieitem${categorieitem.length > 100 ? ' (first 100)' : ''}'] =
- debugSerializeParam(
- categorieitem.take(100),
- ParamType.JSON,
- isList: true,
- link:
- 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=UitgaantabelKaart',
- name: 'dynamic',
- nullable: false,
- );
- debugLogWidgetClass(_model);
- return 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: List.generate(categorieitem.length,
- (categorieitemIndex) {
- final categorieitemItem =
- categorieitem[categorieitemIndex];
- return Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- parentModelCallback: (m) {
- _model.tagCategorieComponentModels[
- 'Keynhs_${categorieitemIndex}_of_${categorieitem.length}'] = m;
- },
- child: TagCategorieComponentWidget(
- key: Key(
- 'Keynhs_${categorieitemIndex}_of_${categorieitem.length}'),
- categorieTag:
- categorieitemItem.toString(),
- ),
- );
- });
- }),
- );
- },
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- Expanded(
- flex: 6,
- child: Padding(
- padding: EdgeInsetsDirectional.fromSTEB(6.0, 0.0, 0.0, 0.0),
- child: ClipRRect(
- child: Container(
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context).secondaryBackground,
- ),
- child: Align(
- alignment: AlignmentDirectional(-1.0, 0.0),
- child: Column(
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.start,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 0.0, 0.0, 0.0, 5.0),
- child: AutoSizeText(
- widget!.titel!.toString(),
- style: FlutterFlowTheme.of(context)
- .bodyLarge
- .override(
- font: GoogleFonts.roboto(
- fontWeight: FlutterFlowTheme.of(context)
- .bodyLarge
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .bodyLarge
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight: FlutterFlowTheme.of(context)
- .bodyLarge
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .bodyLarge
- .fontStyle,
- ),
- overflow: TextOverflow.ellipsis,
- ),
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 2.0, 0.0, 4.0, 0.0),
- child: Icon(
- Icons.add_business_rounded,
- color: FlutterFlowTheme.of(context)
- .primaryText,
- size: 20.0,
- ),
- ),
- Flexible(
- child: Text(
- widget!.horecagelegenheid!.toString(),
- style: FlutterFlowTheme.of(context)
- .bodySmall
- .override(
- font: GoogleFonts.roboto(
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- ),
- ),
- ],
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 2.0, 0.0, 4.0, 0.0),
- child: Icon(
- Icons.location_on_sharp,
- color: FlutterFlowTheme.of(context)
- .primaryText,
- size: 20.0,
- ),
- ),
- Flexible(
- child: Text(
- widget!.adres!.toString(),
- style: FlutterFlowTheme.of(context)
- .bodySmall
- .override(
- font: GoogleFonts.roboto(
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- ),
- ),
- Text(
- FFLocalizations.of(context).getText(
- 'p3hbyhqm' /* , */,
- ),
- 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(
- widget!.plaats!.toString(),
- style: FlutterFlowTheme.of(context)
- .bodySmall
- .override(
- font: GoogleFonts.roboto(
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight: FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- ),
- ],
- ),
- Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- Padding(
- padding: EdgeInsetsDirectional.fromSTEB(
- 2.0, 0.0, 4.0, 0.0),
- child: Icon(
- Icons.calendar_month,
- color: FlutterFlowTheme.of(context)
- .primaryText,
- size: 20.0,
- ),
- ),
- Flexible(
- child: Text(
- widget!.datum!.toString(),
- style: FlutterFlowTheme.of(context)
- .bodySmall
- .override(
- font: GoogleFonts.roboto(
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- ),
- ),
- ],
- ),
- Expanded(
- child: Builder(
- builder: (context) {
- if (widget!.inhoud != null) {
- return Text(
- widget!.inhoud!.toString(),
- textAlign: TextAlign.start,
- style: FlutterFlowTheme.of(context)
- .bodySmall
- .override(
- font: GoogleFonts.roboto(
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontWeight,
- fontStyle:
- FlutterFlowTheme.of(context)
- .bodySmall
- .fontStyle,
- ),
- overflow: TextOverflow.ellipsis,
- );
- } else {
- return Text(
- FFLocalizations.of(context).getText(
- 'q3hgdkv4' /* Binnenkort meer... */,
- ),
- 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,
- ),
- );
- }
- },
- ),
- ),
- ],
- ),
- ),
- ),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- );
- }
- }
|