event_current_widget.dart 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944
  1. import '/backend/api_requests/api_calls.dart';
  2. import '/components/google_maps_icon_button_widget.dart';
  3. import '/components/header_buttons_component_widget.dart';
  4. import '/evenement/evenement_horecagelegenheid/evenement_horecagelegenheid_widget.dart';
  5. import '/evenement/evenement_info/evenement_info_widget.dart';
  6. import '/evenement/evenement_v2_h_t_m_l_component/evenement_v2_h_t_m_l_component_widget.dart';
  7. import '/flutter_flow/flutter_flow_icon_button.dart';
  8. import '/flutter_flow/flutter_flow_theme.dart';
  9. import '/flutter_flow/flutter_flow_util.dart';
  10. import '/flutter_flow/flutter_flow_widgets.dart';
  11. import '/shared/drawer_component/drawer_component_widget.dart';
  12. import 'dart:ui';
  13. import '/custom_code/actions/index.dart' as actions;
  14. import 'package:aligned_tooltip/aligned_tooltip.dart';
  15. import 'package:carousel_slider/carousel_slider.dart';
  16. import 'package:cached_network_image/cached_network_image.dart';
  17. import 'package:flutter/material.dart';
  18. import 'package:flutter_blurhash/flutter_blurhash.dart';
  19. import 'package:flutter_spinkit/flutter_spinkit.dart';
  20. import 'package:google_fonts/google_fonts.dart';
  21. import 'package:octo_image/octo_image.dart';
  22. import 'package:provider/provider.dart';
  23. import 'package:share_plus/share_plus.dart';
  24. import 'event_current_model.dart';
  25. export 'event_current_model.dart';
  26. class EventCurrentWidget extends StatefulWidget {
  27. const EventCurrentWidget({
  28. super.key,
  29. this.nid,
  30. this.horecaid,
  31. });
  32. final String? nid;
  33. final String? horecaid;
  34. static String routeName = 'EventCurrent';
  35. static String routePath = '/eventCurrent';
  36. @override
  37. State<EventCurrentWidget> createState() => _EventCurrentWidgetState();
  38. }
  39. class _EventCurrentWidgetState extends State<EventCurrentWidget>
  40. with RouteAware {
  41. late EventCurrentModel _model;
  42. final scaffoldKey = GlobalKey<ScaffoldState>();
  43. @override
  44. void initState() {
  45. super.initState();
  46. _model = createModel(context, () => EventCurrentModel());
  47. }
  48. @override
  49. void dispose() {
  50. routeObserver.unsubscribe(this);
  51. _model.dispose();
  52. super.dispose();
  53. }
  54. @override
  55. void didUpdateWidget(EventCurrentWidget oldWidget) {
  56. super.didUpdateWidget(oldWidget);
  57. _model.widget = widget;
  58. }
  59. @override
  60. void didChangeDependencies() {
  61. super.didChangeDependencies();
  62. final route = DebugModalRoute.of(context);
  63. if (route != null) {
  64. routeObserver.subscribe(this, route);
  65. }
  66. debugLogGlobalProperty(context);
  67. }
  68. @override
  69. void didPopNext() {
  70. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  71. setState(() => _model.isRouteVisible = true);
  72. debugLogWidgetClass(_model);
  73. }
  74. }
  75. @override
  76. void didPush() {
  77. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  78. setState(() => _model.isRouteVisible = true);
  79. debugLogWidgetClass(_model);
  80. }
  81. }
  82. @override
  83. void didPop() {
  84. _model.isRouteVisible = false;
  85. }
  86. @override
  87. void didPushNext() {
  88. _model.isRouteVisible = false;
  89. }
  90. @override
  91. Widget build(BuildContext context) {
  92. DebugFlutterFlowModelContext.maybeOf(context)
  93. ?.parentModelCallback
  94. ?.call(_model);
  95. return FutureBuilder<ApiCallResponse>(
  96. future: EvenementCall.call(
  97. nid: widget!.nid,
  98. ),
  99. builder: (context, snapshot) {
  100. // Customize what your widget looks like when it's loading.
  101. if (!snapshot.hasData) {
  102. return Scaffold(
  103. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  104. body: Center(
  105. child: SizedBox(
  106. width: 80.0,
  107. height: 80.0,
  108. child: SpinKitFadingCircle(
  109. color: FlutterFlowTheme.of(context).primary,
  110. size: 80.0,
  111. ),
  112. ),
  113. ),
  114. );
  115. }
  116. final eventCurrentEvenementResponse = snapshot.data!;
  117. _model.debugBackendQueries[
  118. 'EvenementCall_statusCode_Scaffold_vv4pr88m'] = debugSerializeParam(
  119. eventCurrentEvenementResponse.statusCode,
  120. ParamType.int,
  121. link:
  122. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=EventCurrent',
  123. name: 'int',
  124. nullable: false,
  125. );
  126. _model.debugBackendQueries[
  127. 'EvenementCall_responseBody_Scaffold_vv4pr88m'] =
  128. debugSerializeParam(
  129. eventCurrentEvenementResponse.bodyText,
  130. ParamType.String,
  131. link:
  132. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=EventCurrent',
  133. name: 'String',
  134. nullable: false,
  135. );
  136. debugLogWidgetClass(_model);
  137. return GestureDetector(
  138. onTap: () {
  139. FocusScope.of(context).unfocus();
  140. FocusManager.instance.primaryFocus?.unfocus();
  141. },
  142. child: Scaffold(
  143. key: scaffoldKey,
  144. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  145. drawer: Drawer(
  146. elevation: 16.0,
  147. child: wrapWithModel(
  148. model: _model.drawerComponentModel,
  149. updateCallback: () => safeSetState(() {}),
  150. child: Builder(builder: (_) {
  151. return DebugFlutterFlowModelContext(
  152. rootModel: _model.rootModel,
  153. child: DrawerComponentWidget(),
  154. );
  155. }),
  156. ),
  157. ),
  158. appBar: PreferredSize(
  159. preferredSize:
  160. Size.fromHeight(MediaQuery.sizeOf(context).height * 0.12),
  161. child: AppBar(
  162. backgroundColor: FlutterFlowTheme.of(context).primaryText,
  163. automaticallyImplyLeading: false,
  164. actions: [],
  165. flexibleSpace: FlexibleSpaceBar(
  166. title: Align(
  167. alignment: AlignmentDirectional(0.0, 0.0),
  168. child: Row(
  169. mainAxisSize: MainAxisSize.max,
  170. children: [
  171. Expanded(
  172. child: wrapWithModel(
  173. model: _model.headerButtonsComponentModel,
  174. updateCallback: () => safeSetState(() {}),
  175. child: Builder(builder: (_) {
  176. return DebugFlutterFlowModelContext(
  177. rootModel: _model.rootModel,
  178. child: HeaderButtonsComponentWidget(),
  179. );
  180. }),
  181. ),
  182. ),
  183. ],
  184. ),
  185. ),
  186. background: Container(),
  187. centerTitle: true,
  188. expandedTitleScale: 1.0,
  189. ),
  190. toolbarHeight: MediaQuery.sizeOf(context).height * 0.2,
  191. elevation: 2.0,
  192. ),
  193. ),
  194. body: SafeArea(
  195. top: true,
  196. child: SingleChildScrollView(
  197. child: Column(
  198. mainAxisSize: MainAxisSize.max,
  199. children: [
  200. Builder(
  201. builder: (context) {
  202. final fotoos = EvenementCall.eventFotoos(
  203. eventCurrentEvenementResponse.jsonBody,
  204. )?.toList() ??
  205. [];
  206. _model.debugGeneratorVariables[
  207. 'fotoos${fotoos.length > 100 ? ' (first 100)' : ''}'] =
  208. debugSerializeParam(
  209. fotoos.take(100),
  210. ParamType.String,
  211. isList: true,
  212. link:
  213. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=EventCurrent',
  214. name: 'String',
  215. nullable: false,
  216. );
  217. debugLogWidgetClass(_model);
  218. return Container(
  219. width: double.infinity,
  220. height: 200.0,
  221. child: CarouselSlider.builder(
  222. itemCount: fotoos.length,
  223. itemBuilder: (context, fotoosIndex, _) {
  224. final fotoosItem = fotoos[fotoosIndex];
  225. return Builder(
  226. builder: (context) {
  227. if (fotoosItem != null && fotoosItem != '') {
  228. return ClipRRect(
  229. borderRadius: BorderRadius.circular(8.0),
  230. child: OctoImage(
  231. placeholderBuilder: (_) {
  232. final blurHash =
  233. 'L6PZfSi_.AyE_3t7t7R**0o#DgR4';
  234. if (!validateBlurhash(blurHash)) {
  235. return const SizedBox.shrink();
  236. }
  237. return SizedBox.expand(
  238. child: Image(
  239. image: BlurHashImage(blurHash),
  240. fit: BoxFit.cover,
  241. ),
  242. );
  243. },
  244. image: CachedNetworkImageProvider(
  245. fotoosItem,
  246. ),
  247. width: 200.0,
  248. height: 200.0,
  249. fit: BoxFit.cover,
  250. ),
  251. );
  252. } else {
  253. return Icon(
  254. Icons.image_not_supported,
  255. color: FlutterFlowTheme.of(context)
  256. .primaryText,
  257. size: 24.0,
  258. );
  259. }
  260. },
  261. );
  262. },
  263. carouselController: _model.carouselController ??=
  264. CarouselSliderController(),
  265. options: CarouselOptions(
  266. initialPage: max(0, min(1, fotoos.length - 1)),
  267. viewportFraction: () {
  268. if (MediaQuery.sizeOf(context).width <
  269. kBreakpointSmall) {
  270. return 0.75;
  271. } else if (MediaQuery.sizeOf(context).width <
  272. kBreakpointMedium) {
  273. return 0.75;
  274. } else if (MediaQuery.sizeOf(context).width <
  275. kBreakpointLarge) {
  276. return 0.5;
  277. } else {
  278. return 0.35;
  279. }
  280. }(),
  281. disableCenter: true,
  282. enlargeCenterPage: true,
  283. enlargeFactor: 0.25,
  284. enableInfiniteScroll: true,
  285. scrollDirection: Axis.horizontal,
  286. autoPlay: false,
  287. onPageChanged: (index, _) =>
  288. _model.carouselCurrentIndex = index,
  289. ),
  290. ),
  291. );
  292. },
  293. ),
  294. Row(
  295. mainAxisSize: MainAxisSize.max,
  296. mainAxisAlignment: MainAxisAlignment.center,
  297. children: [
  298. if (getJsonField(
  299. eventCurrentEvenementResponse.jsonBody,
  300. r'''$[0].title''',
  301. ) !=
  302. null)
  303. Expanded(
  304. child: Padding(
  305. padding: EdgeInsetsDirectional.fromSTEB(
  306. 8.0, 0.0, 8.0, 0.0),
  307. child: Text(
  308. valueOrDefault<String>(
  309. EvenementCall.eventTitle(
  310. eventCurrentEvenementResponse.jsonBody,
  311. ),
  312. 'title',
  313. ),
  314. textAlign: TextAlign.start,
  315. maxLines: 3,
  316. style: FlutterFlowTheme.of(context)
  317. .headlineLarge
  318. .override(
  319. font: GoogleFonts.notoSerif(
  320. fontWeight: FlutterFlowTheme.of(context)
  321. .headlineLarge
  322. .fontWeight,
  323. fontStyle: FlutterFlowTheme.of(context)
  324. .headlineLarge
  325. .fontStyle,
  326. ),
  327. letterSpacing: 0.0,
  328. fontWeight: FlutterFlowTheme.of(context)
  329. .headlineLarge
  330. .fontWeight,
  331. fontStyle: FlutterFlowTheme.of(context)
  332. .headlineLarge
  333. .fontStyle,
  334. ),
  335. ),
  336. ),
  337. ),
  338. AlignedTooltip(
  339. content: Padding(
  340. padding: EdgeInsets.all(4.0),
  341. child: Text(
  342. FFLocalizations.of(context).getText(
  343. '2cyobro5' /* Delen */,
  344. ),
  345. style: FlutterFlowTheme.of(context)
  346. .bodyLarge
  347. .override(
  348. font: GoogleFonts.roboto(
  349. fontWeight: FlutterFlowTheme.of(context)
  350. .bodyLarge
  351. .fontWeight,
  352. fontStyle: FlutterFlowTheme.of(context)
  353. .bodyLarge
  354. .fontStyle,
  355. ),
  356. letterSpacing: 0.0,
  357. fontWeight: FlutterFlowTheme.of(context)
  358. .bodyLarge
  359. .fontWeight,
  360. fontStyle: FlutterFlowTheme.of(context)
  361. .bodyLarge
  362. .fontStyle,
  363. ),
  364. ),
  365. ),
  366. offset: 4.0,
  367. preferredDirection: AxisDirection.down,
  368. borderRadius: BorderRadius.circular(8.0),
  369. backgroundColor:
  370. FlutterFlowTheme.of(context).secondaryBackground,
  371. elevation: 4.0,
  372. tailBaseWidth: 24.0,
  373. tailLength: 12.0,
  374. waitDuration: Duration(milliseconds: 100),
  375. showDuration: Duration(milliseconds: 1500),
  376. triggerMode: TooltipTriggerMode.tap,
  377. child: Builder(
  378. builder: (context) => Padding(
  379. padding: EdgeInsetsDirectional.fromSTEB(
  380. 0.0, 0.0, 12.0, 0.0),
  381. child: FlutterFlowIconButton(
  382. borderRadius: 8.0,
  383. buttonSize: 40.0,
  384. fillColor:
  385. FlutterFlowTheme.of(context).secondary,
  386. icon: Icon(
  387. Icons.share,
  388. color: FlutterFlowTheme.of(context).info,
  389. size: 24.0,
  390. ),
  391. onPressed: () async {
  392. await Share.share(
  393. 'https://uitgk.com/${widget!.nid}',
  394. sharePositionOrigin:
  395. getWidgetBoundingBox(context),
  396. );
  397. },
  398. ),
  399. ),
  400. ),
  401. ),
  402. AlignedTooltip(
  403. content: Padding(
  404. padding: EdgeInsets.all(4.0),
  405. child: Text(
  406. FFLocalizations.of(context).getText(
  407. 'e08zfyf3' /* Zet in mijn agenda */,
  408. ),
  409. style: FlutterFlowTheme.of(context)
  410. .bodyLarge
  411. .override(
  412. font: GoogleFonts.roboto(
  413. fontWeight: FlutterFlowTheme.of(context)
  414. .bodyLarge
  415. .fontWeight,
  416. fontStyle: FlutterFlowTheme.of(context)
  417. .bodyLarge
  418. .fontStyle,
  419. ),
  420. letterSpacing: 0.0,
  421. fontWeight: FlutterFlowTheme.of(context)
  422. .bodyLarge
  423. .fontWeight,
  424. fontStyle: FlutterFlowTheme.of(context)
  425. .bodyLarge
  426. .fontStyle,
  427. ),
  428. ),
  429. ),
  430. offset: 4.0,
  431. preferredDirection: AxisDirection.down,
  432. borderRadius: BorderRadius.circular(8.0),
  433. backgroundColor:
  434. FlutterFlowTheme.of(context).secondaryBackground,
  435. elevation: 4.0,
  436. tailBaseWidth: 24.0,
  437. tailLength: 12.0,
  438. waitDuration: Duration(milliseconds: 100),
  439. showDuration: Duration(milliseconds: 1500),
  440. triggerMode: TooltipTriggerMode.tap,
  441. child: FlutterFlowIconButton(
  442. borderRadius: 8.0,
  443. buttonSize: 40.0,
  444. fillColor: FlutterFlowTheme.of(context).secondary,
  445. icon: Icon(
  446. Icons.event_available,
  447. color: FlutterFlowTheme.of(context).info,
  448. size: 24.0,
  449. ),
  450. onPressed: () async {
  451. await actions.zetInAgenda(
  452. getJsonField(
  453. eventCurrentEvenementResponse.jsonBody,
  454. r'''$[0].title''',
  455. ).toString(),
  456. getJsonField(
  457. eventCurrentEvenementResponse.jsonBody,
  458. r'''$[0].datum_iso''',
  459. ).toString(),
  460. '',
  461. getJsonField(
  462. eventCurrentEvenementResponse.jsonBody,
  463. r'''$[0].adres''',
  464. ).toString(),
  465. getJsonField(
  466. eventCurrentEvenementResponse.jsonBody,
  467. r'''$[0].body''',
  468. ).toString(),
  469. getJsonField(
  470. eventCurrentEvenementResponse.jsonBody,
  471. r'''$[0].plaats''',
  472. ).toString(),
  473. widget!.nid,
  474. );
  475. },
  476. ),
  477. ),
  478. ],
  479. ),
  480. Row(
  481. mainAxisSize: MainAxisSize.max,
  482. children: [
  483. Padding(
  484. padding: EdgeInsetsDirectional.fromSTEB(
  485. 8.0, 0.0, 4.0, 0.0),
  486. child: Icon(
  487. Icons.calendar_month,
  488. color: FlutterFlowTheme.of(context).primaryText,
  489. size: 20.0,
  490. ),
  491. ),
  492. if (getJsonField(
  493. eventCurrentEvenementResponse.jsonBody,
  494. r'''$[0].datum''',
  495. ) !=
  496. null)
  497. Align(
  498. alignment: AlignmentDirectional(-1.0, 0.0),
  499. child: Padding(
  500. padding: EdgeInsetsDirectional.fromSTEB(
  501. 8.0, 0.0, 0.0, 0.0),
  502. child: Text(
  503. valueOrDefault<String>(
  504. EvenementCall.eventDate(
  505. eventCurrentEvenementResponse.jsonBody,
  506. ),
  507. 'date',
  508. ),
  509. style: FlutterFlowTheme.of(context)
  510. .titleMedium
  511. .override(
  512. font: GoogleFonts.roboto(
  513. fontWeight: FlutterFlowTheme.of(context)
  514. .titleMedium
  515. .fontWeight,
  516. fontStyle: FlutterFlowTheme.of(context)
  517. .titleMedium
  518. .fontStyle,
  519. ),
  520. letterSpacing: 0.0,
  521. fontWeight: FlutterFlowTheme.of(context)
  522. .titleMedium
  523. .fontWeight,
  524. fontStyle: FlutterFlowTheme.of(context)
  525. .titleMedium
  526. .fontStyle,
  527. ),
  528. ),
  529. ),
  530. ),
  531. ],
  532. ),
  533. Column(
  534. mainAxisSize: MainAxisSize.min,
  535. children: [
  536. Material(
  537. color: Colors.transparent,
  538. elevation: 0.0,
  539. child: Container(
  540. decoration: BoxDecoration(
  541. boxShadow: [
  542. BoxShadow(
  543. blurRadius: 4.0,
  544. color: Colors.transparent,
  545. offset: Offset(
  546. 0.0,
  547. 2.0,
  548. ),
  549. )
  550. ],
  551. gradient: LinearGradient(
  552. colors: [
  553. FlutterFlowTheme.of(context)
  554. .secondaryBackground,
  555. FlutterFlowTheme.of(context)
  556. .secondaryBackground
  557. ],
  558. stops: [0.0, 1.0],
  559. begin: AlignmentDirectional(0.0, -1.0),
  560. end: AlignmentDirectional(0, 1.0),
  561. ),
  562. border: Border.all(
  563. color: FlutterFlowTheme.of(context).alternate,
  564. width: 3.0,
  565. ),
  566. ),
  567. child: Column(
  568. mainAxisSize: MainAxisSize.min,
  569. children: [
  570. Padding(
  571. padding: EdgeInsetsDirectional.fromSTEB(
  572. 1.0, 3.0, 1.0, 2.0),
  573. child: Builder(
  574. builder: (context) {
  575. final categorie =
  576. EvenementCall.eventCategorie(
  577. eventCurrentEvenementResponse
  578. .jsonBody,
  579. )?.toList() ??
  580. [];
  581. _model.debugGeneratorVariables[
  582. 'categorie${categorie.length > 100 ? ' (first 100)' : ''}'] =
  583. debugSerializeParam(
  584. categorie.take(100),
  585. ParamType.String,
  586. isList: true,
  587. link:
  588. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=EventCurrent',
  589. name: 'String',
  590. nullable: false,
  591. );
  592. debugLogWidgetClass(_model);
  593. return Wrap(
  594. spacing: 0.0,
  595. runSpacing: 0.0,
  596. alignment: WrapAlignment.start,
  597. crossAxisAlignment:
  598. WrapCrossAlignment.start,
  599. direction: Axis.horizontal,
  600. runAlignment: WrapAlignment.start,
  601. verticalDirection:
  602. VerticalDirection.down,
  603. clipBehavior: Clip.none,
  604. children: List.generate(
  605. categorie.length, (categorieIndex) {
  606. final categorieItem =
  607. categorie[categorieIndex];
  608. return Align(
  609. alignment:
  610. AlignmentDirectional(1.0, 0.0),
  611. child: Padding(
  612. padding: EdgeInsetsDirectional
  613. .fromSTEB(4.0, 1.0, 4.0, 1.0),
  614. child: Material(
  615. color: Colors.transparent,
  616. elevation: 0.0,
  617. shape: RoundedRectangleBorder(
  618. borderRadius:
  619. BorderRadius.circular(
  620. 0.0),
  621. ),
  622. child: Container(
  623. decoration: BoxDecoration(
  624. color: FlutterFlowTheme.of(
  625. context)
  626. .tertiary,
  627. boxShadow: [
  628. BoxShadow(
  629. blurRadius: 4.0,
  630. color:
  631. Color(0x33000000),
  632. offset: Offset(
  633. 0.0,
  634. 2.0,
  635. ),
  636. )
  637. ],
  638. borderRadius:
  639. BorderRadius.circular(
  640. 0.0),
  641. border: Border.all(
  642. width: 0.0,
  643. ),
  644. ),
  645. child: Padding(
  646. padding:
  647. EdgeInsetsDirectional
  648. .fromSTEB(0.0, 0.0,
  649. 4.0, 0.0),
  650. child: Text(
  651. categorieItem,
  652. style:
  653. FlutterFlowTheme.of(
  654. context)
  655. .titleSmall
  656. .override(
  657. font:
  658. GoogleFonts
  659. .roboto(
  660. fontWeight: FlutterFlowTheme.of(
  661. context)
  662. .titleSmall
  663. .fontWeight,
  664. fontStyle: FlutterFlowTheme.of(
  665. context)
  666. .titleSmall
  667. .fontStyle,
  668. ),
  669. letterSpacing:
  670. 0.0,
  671. fontWeight: FlutterFlowTheme.of(
  672. context)
  673. .titleSmall
  674. .fontWeight,
  675. fontStyle: FlutterFlowTheme.of(
  676. context)
  677. .titleSmall
  678. .fontStyle,
  679. ),
  680. ),
  681. ),
  682. ),
  683. ),
  684. ),
  685. );
  686. }),
  687. );
  688. },
  689. ),
  690. ),
  691. Row(
  692. mainAxisSize: MainAxisSize.max,
  693. crossAxisAlignment: CrossAxisAlignment.start,
  694. children: [
  695. Builder(
  696. builder: (context) {
  697. if (getJsonField(
  698. eventCurrentEvenementResponse
  699. .jsonBody,
  700. r'''$[0].logo''',
  701. ) !=
  702. null) {
  703. return Padding(
  704. padding:
  705. EdgeInsetsDirectional.fromSTEB(
  706. 4.0, 2.0, 4.0, 15.0),
  707. child: ClipRRect(
  708. borderRadius:
  709. BorderRadius.circular(8.0),
  710. child: OctoImage(
  711. placeholderBuilder: (_) {
  712. final blurHash =
  713. 'L6PZfSi_.AyE_3t7t7R**0o#DgR4';
  714. if (!validateBlurhash(
  715. blurHash)) {
  716. return const SizedBox
  717. .shrink();
  718. }
  719. return SizedBox.expand(
  720. child: Image(
  721. image: BlurHashImage(
  722. blurHash),
  723. fit: BoxFit.cover,
  724. ),
  725. );
  726. },
  727. image:
  728. CachedNetworkImageProvider(
  729. EvenementCall.eventLogog(
  730. eventCurrentEvenementResponse
  731. .jsonBody,
  732. )!,
  733. ),
  734. width: 96.0,
  735. height: 96.0,
  736. fit: BoxFit.cover,
  737. ),
  738. ),
  739. );
  740. } else {
  741. return Icon(
  742. Icons.image_not_supported,
  743. color: FlutterFlowTheme.of(context)
  744. .primaryText,
  745. size: 24.0,
  746. );
  747. }
  748. },
  749. ),
  750. Expanded(
  751. child: wrapWithModel(
  752. model: _model.evenementInfoModel,
  753. updateCallback: () =>
  754. safeSetState(() {}),
  755. child: Builder(builder: (_) {
  756. return DebugFlutterFlowModelContext(
  757. rootModel: _model.rootModel,
  758. child: EvenementInfoWidget(
  759. nid: EvenementCall.eventNid(
  760. eventCurrentEvenementResponse
  761. .jsonBody,
  762. ),
  763. title: EvenementCall.eventTitle(
  764. eventCurrentEvenementResponse
  765. .jsonBody,
  766. ),
  767. date: EvenementCall.eventDate(
  768. eventCurrentEvenementResponse
  769. .jsonBody,
  770. ),
  771. adres: EvenementCall.eventAdres(
  772. eventCurrentEvenementResponse
  773. .jsonBody,
  774. ),
  775. plaats: EvenementCall.eventPlaats(
  776. eventCurrentEvenementResponse
  777. .jsonBody,
  778. ),
  779. entreetoelichting: EvenementCall
  780. .eventEntreeToelichting(
  781. eventCurrentEvenementResponse
  782. .jsonBody,
  783. ),
  784. entreeprijs: EvenementCall
  785. .eventEntreeprijs(
  786. eventCurrentEvenementResponse
  787. .jsonBody,
  788. ),
  789. website:
  790. EvenementCall.eventWebsiteg(
  791. eventCurrentEvenementResponse
  792. .jsonBody,
  793. ),
  794. contact:
  795. EvenementCall.eventContact(
  796. eventCurrentEvenementResponse
  797. .jsonBody,
  798. ),
  799. logo: EvenementCall.eventLogog(
  800. eventCurrentEvenementResponse
  801. .jsonBody,
  802. ),
  803. fotoos: EvenementCall.eventFotoos(
  804. eventCurrentEvenementResponse
  805. .jsonBody,
  806. ),
  807. categories:
  808. EvenementCall.eventCategorie(
  809. eventCurrentEvenementResponse
  810. .jsonBody,
  811. ),
  812. organisator: EvenementCall
  813. .eventOrganisator(
  814. eventCurrentEvenementResponse
  815. .jsonBody,
  816. ),
  817. ),
  818. );
  819. }),
  820. ),
  821. ),
  822. wrapWithModel(
  823. model: _model.googleMapsIconButtonModel,
  824. updateCallback: () => safeSetState(() {}),
  825. child: Builder(builder: (_) {
  826. return DebugFlutterFlowModelContext(
  827. rootModel: _model.rootModel,
  828. child: GoogleMapsIconButtonWidget(
  829. adres: EvenementCall.eventAdres(
  830. eventCurrentEvenementResponse
  831. .jsonBody,
  832. )!,
  833. plaats: EvenementCall.eventPlaats(
  834. eventCurrentEvenementResponse
  835. .jsonBody,
  836. )!,
  837. ),
  838. );
  839. }),
  840. ),
  841. ],
  842. ),
  843. ],
  844. ),
  845. ),
  846. ),
  847. SingleChildScrollView(
  848. child: Column(
  849. mainAxisSize: MainAxisSize.max,
  850. children: [
  851. Container(
  852. width: MediaQuery.sizeOf(context).width * 1.0,
  853. decoration: BoxDecoration(
  854. color: FlutterFlowTheme.of(context)
  855. .secondaryBackground,
  856. boxShadow: [
  857. BoxShadow(
  858. blurRadius: 4.0,
  859. color: Colors.transparent,
  860. offset: Offset(
  861. 4.0,
  862. 2.0,
  863. ),
  864. )
  865. ],
  866. borderRadius: BorderRadius.circular(4.0),
  867. border: Border.all(
  868. color:
  869. FlutterFlowTheme.of(context).alternate,
  870. ),
  871. ),
  872. child: wrapWithModel(
  873. model: _model.evenementV2HTMLComponentModel,
  874. updateCallback: () => safeSetState(() {}),
  875. child: Builder(builder: (_) {
  876. return DebugFlutterFlowModelContext(
  877. rootModel: _model.rootModel,
  878. child: EvenementV2HTMLComponentWidget(
  879. body: EvenementCall.eventBody(
  880. eventCurrentEvenementResponse
  881. .jsonBody,
  882. ),
  883. ),
  884. );
  885. }),
  886. ),
  887. ),
  888. ],
  889. ),
  890. ),
  891. ],
  892. ),
  893. Container(
  894. decoration: BoxDecoration(),
  895. child: Visibility(
  896. visible:
  897. widget!.horecaid != null && widget!.horecaid != '',
  898. child: wrapWithModel(
  899. model: _model.evenementHorecagelegenheidModel,
  900. updateCallback: () => safeSetState(() {}),
  901. child: Builder(builder: (_) {
  902. return DebugFlutterFlowModelContext(
  903. rootModel: _model.rootModel,
  904. child: EvenementHorecagelegenheidWidget(
  905. establishmentID: widget!.horecaid!,
  906. ),
  907. );
  908. }),
  909. ),
  910. ),
  911. ),
  912. ],
  913. ),
  914. ),
  915. ),
  916. ),
  917. );
  918. },
  919. );
  920. }
  921. }