event_current_widget.dart 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948
  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: Padding(
  442. padding: EdgeInsetsDirectional.fromSTEB(
  443. 0.0, 0.0, 12.0, 0.0),
  444. child: FlutterFlowIconButton(
  445. borderRadius: 8.0,
  446. buttonSize: 40.0,
  447. fillColor: FlutterFlowTheme.of(context).secondary,
  448. icon: Icon(
  449. Icons.event_available,
  450. color: FlutterFlowTheme.of(context).info,
  451. size: 24.0,
  452. ),
  453. onPressed: () async {
  454. await actions.zetInAgenda(
  455. getJsonField(
  456. eventCurrentEvenementResponse.jsonBody,
  457. r'''$[0].title''',
  458. ).toString(),
  459. getJsonField(
  460. eventCurrentEvenementResponse.jsonBody,
  461. r'''$[0].datum_iso''',
  462. ).toString(),
  463. '',
  464. getJsonField(
  465. eventCurrentEvenementResponse.jsonBody,
  466. r'''$[0].adres''',
  467. ).toString(),
  468. getJsonField(
  469. eventCurrentEvenementResponse.jsonBody,
  470. r'''$[0].body''',
  471. ).toString(),
  472. getJsonField(
  473. eventCurrentEvenementResponse.jsonBody,
  474. r'''$[0].plaats''',
  475. ).toString(),
  476. widget!.nid,
  477. );
  478. },
  479. ),
  480. ),
  481. ),
  482. ],
  483. ),
  484. Row(
  485. mainAxisSize: MainAxisSize.max,
  486. children: [
  487. Padding(
  488. padding: EdgeInsetsDirectional.fromSTEB(
  489. 8.0, 0.0, 4.0, 0.0),
  490. child: Icon(
  491. Icons.calendar_month,
  492. color: FlutterFlowTheme.of(context).primaryText,
  493. size: 20.0,
  494. ),
  495. ),
  496. if (getJsonField(
  497. eventCurrentEvenementResponse.jsonBody,
  498. r'''$[0].datum''',
  499. ) !=
  500. null)
  501. Align(
  502. alignment: AlignmentDirectional(-1.0, 0.0),
  503. child: Padding(
  504. padding: EdgeInsetsDirectional.fromSTEB(
  505. 8.0, 0.0, 0.0, 0.0),
  506. child: Text(
  507. valueOrDefault<String>(
  508. EvenementCall.eventDate(
  509. eventCurrentEvenementResponse.jsonBody,
  510. ),
  511. 'date',
  512. ),
  513. style: FlutterFlowTheme.of(context)
  514. .titleMedium
  515. .override(
  516. font: GoogleFonts.roboto(
  517. fontWeight: FlutterFlowTheme.of(context)
  518. .titleMedium
  519. .fontWeight,
  520. fontStyle: FlutterFlowTheme.of(context)
  521. .titleMedium
  522. .fontStyle,
  523. ),
  524. letterSpacing: 0.0,
  525. fontWeight: FlutterFlowTheme.of(context)
  526. .titleMedium
  527. .fontWeight,
  528. fontStyle: FlutterFlowTheme.of(context)
  529. .titleMedium
  530. .fontStyle,
  531. ),
  532. ),
  533. ),
  534. ),
  535. ],
  536. ),
  537. Column(
  538. mainAxisSize: MainAxisSize.min,
  539. children: [
  540. Material(
  541. color: Colors.transparent,
  542. elevation: 0.0,
  543. child: Container(
  544. decoration: BoxDecoration(
  545. boxShadow: [
  546. BoxShadow(
  547. blurRadius: 4.0,
  548. color: Colors.transparent,
  549. offset: Offset(
  550. 0.0,
  551. 2.0,
  552. ),
  553. )
  554. ],
  555. gradient: LinearGradient(
  556. colors: [
  557. FlutterFlowTheme.of(context)
  558. .secondaryBackground,
  559. FlutterFlowTheme.of(context)
  560. .secondaryBackground
  561. ],
  562. stops: [0.0, 1.0],
  563. begin: AlignmentDirectional(0.0, -1.0),
  564. end: AlignmentDirectional(0, 1.0),
  565. ),
  566. border: Border.all(
  567. color: FlutterFlowTheme.of(context).alternate,
  568. width: 3.0,
  569. ),
  570. ),
  571. child: Column(
  572. mainAxisSize: MainAxisSize.min,
  573. children: [
  574. Padding(
  575. padding: EdgeInsetsDirectional.fromSTEB(
  576. 1.0, 3.0, 12.0, 2.0),
  577. child: Builder(
  578. builder: (context) {
  579. final categorie =
  580. EvenementCall.eventCategorie(
  581. eventCurrentEvenementResponse
  582. .jsonBody,
  583. )?.toList() ??
  584. [];
  585. _model.debugGeneratorVariables[
  586. 'categorie${categorie.length > 100 ? ' (first 100)' : ''}'] =
  587. debugSerializeParam(
  588. categorie.take(100),
  589. ParamType.String,
  590. isList: true,
  591. link:
  592. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=EventCurrent',
  593. name: 'String',
  594. nullable: false,
  595. );
  596. debugLogWidgetClass(_model);
  597. return Wrap(
  598. spacing: 0.0,
  599. runSpacing: 0.0,
  600. alignment: WrapAlignment.start,
  601. crossAxisAlignment:
  602. WrapCrossAlignment.start,
  603. direction: Axis.horizontal,
  604. runAlignment: WrapAlignment.start,
  605. verticalDirection:
  606. VerticalDirection.down,
  607. clipBehavior: Clip.none,
  608. children: List.generate(
  609. categorie.length, (categorieIndex) {
  610. final categorieItem =
  611. categorie[categorieIndex];
  612. return Align(
  613. alignment:
  614. AlignmentDirectional(1.0, 0.0),
  615. child: Padding(
  616. padding: EdgeInsetsDirectional
  617. .fromSTEB(4.0, 1.0, 4.0, 1.0),
  618. child: Material(
  619. color: Colors.transparent,
  620. elevation: 0.0,
  621. shape: RoundedRectangleBorder(
  622. borderRadius:
  623. BorderRadius.circular(
  624. 0.0),
  625. ),
  626. child: Container(
  627. decoration: BoxDecoration(
  628. color: FlutterFlowTheme.of(
  629. context)
  630. .tertiary,
  631. boxShadow: [
  632. BoxShadow(
  633. blurRadius: 4.0,
  634. color:
  635. Color(0x33000000),
  636. offset: Offset(
  637. 0.0,
  638. 2.0,
  639. ),
  640. )
  641. ],
  642. borderRadius:
  643. BorderRadius.circular(
  644. 0.0),
  645. border: Border.all(
  646. width: 0.0,
  647. ),
  648. ),
  649. child: Padding(
  650. padding:
  651. EdgeInsetsDirectional
  652. .fromSTEB(0.0, 0.0,
  653. 4.0, 0.0),
  654. child: Text(
  655. categorieItem,
  656. style:
  657. FlutterFlowTheme.of(
  658. context)
  659. .titleSmall
  660. .override(
  661. font:
  662. GoogleFonts
  663. .roboto(
  664. fontWeight: FlutterFlowTheme.of(
  665. context)
  666. .titleSmall
  667. .fontWeight,
  668. fontStyle: FlutterFlowTheme.of(
  669. context)
  670. .titleSmall
  671. .fontStyle,
  672. ),
  673. letterSpacing:
  674. 0.0,
  675. fontWeight: FlutterFlowTheme.of(
  676. context)
  677. .titleSmall
  678. .fontWeight,
  679. fontStyle: FlutterFlowTheme.of(
  680. context)
  681. .titleSmall
  682. .fontStyle,
  683. ),
  684. ),
  685. ),
  686. ),
  687. ),
  688. ),
  689. );
  690. }),
  691. );
  692. },
  693. ),
  694. ),
  695. Row(
  696. mainAxisSize: MainAxisSize.max,
  697. crossAxisAlignment: CrossAxisAlignment.start,
  698. children: [
  699. Builder(
  700. builder: (context) {
  701. if (getJsonField(
  702. eventCurrentEvenementResponse
  703. .jsonBody,
  704. r'''$[0].logo''',
  705. ) !=
  706. null) {
  707. return Padding(
  708. padding:
  709. EdgeInsetsDirectional.fromSTEB(
  710. 4.0, 2.0, 4.0, 15.0),
  711. child: ClipRRect(
  712. borderRadius:
  713. BorderRadius.circular(8.0),
  714. child: OctoImage(
  715. placeholderBuilder: (_) {
  716. final blurHash =
  717. 'L6PZfSi_.AyE_3t7t7R**0o#DgR4';
  718. if (!validateBlurhash(
  719. blurHash)) {
  720. return const SizedBox
  721. .shrink();
  722. }
  723. return SizedBox.expand(
  724. child: Image(
  725. image: BlurHashImage(
  726. blurHash),
  727. fit: BoxFit.cover,
  728. ),
  729. );
  730. },
  731. image:
  732. CachedNetworkImageProvider(
  733. EvenementCall.eventLogog(
  734. eventCurrentEvenementResponse
  735. .jsonBody,
  736. )!,
  737. ),
  738. width: 96.0,
  739. height: 96.0,
  740. fit: BoxFit.cover,
  741. ),
  742. ),
  743. );
  744. } else {
  745. return Icon(
  746. Icons.image_not_supported,
  747. color: FlutterFlowTheme.of(context)
  748. .primaryText,
  749. size: 24.0,
  750. );
  751. }
  752. },
  753. ),
  754. Expanded(
  755. child: wrapWithModel(
  756. model: _model.evenementInfoModel,
  757. updateCallback: () =>
  758. safeSetState(() {}),
  759. child: Builder(builder: (_) {
  760. return DebugFlutterFlowModelContext(
  761. rootModel: _model.rootModel,
  762. child: EvenementInfoWidget(
  763. nid: EvenementCall.eventNid(
  764. eventCurrentEvenementResponse
  765. .jsonBody,
  766. ),
  767. title: EvenementCall.eventTitle(
  768. eventCurrentEvenementResponse
  769. .jsonBody,
  770. ),
  771. date: EvenementCall.eventDate(
  772. eventCurrentEvenementResponse
  773. .jsonBody,
  774. ),
  775. adres: EvenementCall.eventAdres(
  776. eventCurrentEvenementResponse
  777. .jsonBody,
  778. ),
  779. plaats: EvenementCall.eventPlaats(
  780. eventCurrentEvenementResponse
  781. .jsonBody,
  782. ),
  783. entreetoelichting: EvenementCall
  784. .eventEntreeToelichting(
  785. eventCurrentEvenementResponse
  786. .jsonBody,
  787. ),
  788. entreeprijs: EvenementCall
  789. .eventEntreeprijs(
  790. eventCurrentEvenementResponse
  791. .jsonBody,
  792. ),
  793. website:
  794. EvenementCall.eventWebsiteg(
  795. eventCurrentEvenementResponse
  796. .jsonBody,
  797. ),
  798. contact:
  799. EvenementCall.eventContact(
  800. eventCurrentEvenementResponse
  801. .jsonBody,
  802. ),
  803. logo: EvenementCall.eventLogog(
  804. eventCurrentEvenementResponse
  805. .jsonBody,
  806. ),
  807. fotoos: EvenementCall.eventFotoos(
  808. eventCurrentEvenementResponse
  809. .jsonBody,
  810. ),
  811. categories:
  812. EvenementCall.eventCategorie(
  813. eventCurrentEvenementResponse
  814. .jsonBody,
  815. ),
  816. organisator: EvenementCall
  817. .eventOrganisator(
  818. eventCurrentEvenementResponse
  819. .jsonBody,
  820. ),
  821. ),
  822. );
  823. }),
  824. ),
  825. ),
  826. wrapWithModel(
  827. model: _model.googleMapsIconButtonModel,
  828. updateCallback: () => safeSetState(() {}),
  829. child: Builder(builder: (_) {
  830. return DebugFlutterFlowModelContext(
  831. rootModel: _model.rootModel,
  832. child: GoogleMapsIconButtonWidget(
  833. adres: EvenementCall.eventAdres(
  834. eventCurrentEvenementResponse
  835. .jsonBody,
  836. )!,
  837. plaats: EvenementCall.eventPlaats(
  838. eventCurrentEvenementResponse
  839. .jsonBody,
  840. )!,
  841. ),
  842. );
  843. }),
  844. ),
  845. ],
  846. ),
  847. ],
  848. ),
  849. ),
  850. ),
  851. SingleChildScrollView(
  852. child: Column(
  853. mainAxisSize: MainAxisSize.max,
  854. children: [
  855. Container(
  856. width: MediaQuery.sizeOf(context).width * 1.0,
  857. decoration: BoxDecoration(
  858. color: FlutterFlowTheme.of(context)
  859. .secondaryBackground,
  860. boxShadow: [
  861. BoxShadow(
  862. blurRadius: 4.0,
  863. color: Colors.transparent,
  864. offset: Offset(
  865. 4.0,
  866. 2.0,
  867. ),
  868. )
  869. ],
  870. borderRadius: BorderRadius.circular(4.0),
  871. border: Border.all(
  872. color:
  873. FlutterFlowTheme.of(context).alternate,
  874. ),
  875. ),
  876. child: wrapWithModel(
  877. model: _model.evenementV2HTMLComponentModel,
  878. updateCallback: () => safeSetState(() {}),
  879. child: Builder(builder: (_) {
  880. return DebugFlutterFlowModelContext(
  881. rootModel: _model.rootModel,
  882. child: EvenementV2HTMLComponentWidget(
  883. body: EvenementCall.eventBody(
  884. eventCurrentEvenementResponse
  885. .jsonBody,
  886. ),
  887. ),
  888. );
  889. }),
  890. ),
  891. ),
  892. ],
  893. ),
  894. ),
  895. ],
  896. ),
  897. Container(
  898. decoration: BoxDecoration(),
  899. child: Visibility(
  900. visible:
  901. widget!.horecaid != null && widget!.horecaid != '',
  902. child: wrapWithModel(
  903. model: _model.evenementHorecagelegenheidModel,
  904. updateCallback: () => safeSetState(() {}),
  905. child: Builder(builder: (_) {
  906. return DebugFlutterFlowModelContext(
  907. rootModel: _model.rootModel,
  908. child: EvenementHorecagelegenheidWidget(
  909. establishmentID: widget!.horecaid!,
  910. ),
  911. );
  912. }),
  913. ),
  914. ),
  915. ),
  916. ],
  917. ),
  918. ),
  919. ),
  920. ),
  921. );
  922. },
  923. );
  924. }
  925. }