horecagelegenheden_overzicht_widget.dart 119 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940
  1. import '/backend/api_requests/api_calls.dart';
  2. import '/components/header_buttons_component_widget.dart';
  3. import '/flutter_flow/flutter_flow_theme.dart';
  4. import '/flutter_flow/flutter_flow_util.dart';
  5. import '/flutter_flow/flutter_flow_widgets.dart';
  6. import '/horecagelegenhedenoverzicht/horecagelegenheidoverzicht_kaart/horecagelegenheidoverzicht_kaart_widget.dart';
  7. import '/shared/drawer_component/drawer_component_widget.dart';
  8. import 'dart:ui';
  9. import '/custom_code/actions/index.dart' as actions;
  10. import '/index.dart';
  11. import 'package:flutter/material.dart';
  12. import 'package:flutter/scheduler.dart';
  13. import 'package:flutter_spinkit/flutter_spinkit.dart';
  14. import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
  15. import 'package:google_fonts/google_fonts.dart';
  16. import 'package:provider/provider.dart';
  17. import 'horecagelegenheden_overzicht_model.dart';
  18. export 'horecagelegenheden_overzicht_model.dart';
  19. class HorecagelegenhedenOverzichtWidget extends StatefulWidget {
  20. const HorecagelegenhedenOverzichtWidget({
  21. super.key,
  22. required this.plaats,
  23. });
  24. final String? plaats;
  25. static String routeName = 'HorecagelegenhedenOverzicht';
  26. static String routePath = '/horecagelegenhedenOverzicht';
  27. @override
  28. State<HorecagelegenhedenOverzichtWidget> createState() =>
  29. _HorecagelegenhedenOverzichtWidgetState();
  30. }
  31. class _HorecagelegenhedenOverzichtWidgetState
  32. extends State<HorecagelegenhedenOverzichtWidget>
  33. with TickerProviderStateMixin, RouteAware {
  34. late HorecagelegenhedenOverzichtModel _model;
  35. final scaffoldKey = GlobalKey<ScaffoldState>();
  36. @override
  37. void initState() {
  38. super.initState();
  39. _model = createModel(context, () => HorecagelegenhedenOverzichtModel());
  40. // On page load action.
  41. SchedulerBinding.instance.addPostFrameCallback((_) async {
  42. _model.resultHorecaActiviteiten =
  43. await actions.fetchAlleHorecagelegenheden(
  44. '17969',
  45. widget!.plaats!,
  46. 'services_1',
  47. );
  48. _model.alleActiviteiten =
  49. _model.resultHorecaActiviteiten!.toList().cast<dynamic>();
  50. safeSetState(() {});
  51. });
  52. _model.tabBarController = TabController(
  53. vsync: this,
  54. length: 6,
  55. initialIndex: 0,
  56. )
  57. ..addListener(() => safeSetState(() {}))
  58. ..addListener(() {
  59. debugLogWidgetClass(_model);
  60. });
  61. _model.textController1 ??= TextEditingController()
  62. ..addListener(() {
  63. debugLogWidgetClass(_model);
  64. });
  65. _model.textFieldFocusNode1 ??= FocusNode();
  66. _model.textController2 ??= TextEditingController()
  67. ..addListener(() {
  68. debugLogWidgetClass(_model);
  69. });
  70. _model.textFieldFocusNode2 ??= FocusNode();
  71. }
  72. @override
  73. void dispose() {
  74. routeObserver.unsubscribe(this);
  75. _model.dispose();
  76. super.dispose();
  77. }
  78. @override
  79. void didUpdateWidget(HorecagelegenhedenOverzichtWidget oldWidget) {
  80. super.didUpdateWidget(oldWidget);
  81. _model.widget = widget;
  82. }
  83. @override
  84. void didChangeDependencies() {
  85. super.didChangeDependencies();
  86. final route = DebugModalRoute.of(context);
  87. if (route != null) {
  88. routeObserver.subscribe(this, route);
  89. }
  90. debugLogGlobalProperty(context);
  91. }
  92. @override
  93. void didPopNext() {
  94. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  95. setState(() => _model.isRouteVisible = true);
  96. debugLogWidgetClass(_model);
  97. }
  98. }
  99. @override
  100. void didPush() {
  101. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  102. setState(() => _model.isRouteVisible = true);
  103. debugLogWidgetClass(_model);
  104. }
  105. }
  106. @override
  107. void didPop() {
  108. _model.isRouteVisible = false;
  109. }
  110. @override
  111. void didPushNext() {
  112. _model.isRouteVisible = false;
  113. }
  114. @override
  115. Widget build(BuildContext context) {
  116. DebugFlutterFlowModelContext.maybeOf(context)
  117. ?.parentModelCallback
  118. ?.call(_model);
  119. context.watch<FFAppState>();
  120. _model.horecagelegenheidoverzichtKaartModels1.clear();
  121. _model.horecagelegenheidoverzichtKaartModels2.clear();
  122. _model.horecagelegenheidoverzichtKaartModels3.clear();
  123. _model.horecagelegenheidoverzichtKaartModels4.clear();
  124. _model.horecagelegenheidoverzichtKaartModels5.clear();
  125. _model.horecagelegenheidoverzichtKaartModels6.clear();
  126. return GestureDetector(
  127. onTap: () {
  128. FocusScope.of(context).unfocus();
  129. FocusManager.instance.primaryFocus?.unfocus();
  130. },
  131. child: Scaffold(
  132. key: scaffoldKey,
  133. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  134. drawer: Drawer(
  135. elevation: 16.0,
  136. child: wrapWithModel(
  137. model: _model.drawerComponentModel,
  138. updateCallback: () => safeSetState(() {}),
  139. child: Builder(builder: (_) {
  140. return DebugFlutterFlowModelContext(
  141. rootModel: _model.rootModel,
  142. child: DrawerComponentWidget(),
  143. );
  144. }),
  145. ),
  146. ),
  147. appBar: PreferredSize(
  148. preferredSize: Size.fromHeight(80.0),
  149. child: AppBar(
  150. backgroundColor: FlutterFlowTheme.of(context).info,
  151. iconTheme:
  152. IconThemeData(color: FlutterFlowTheme.of(context).secondary),
  153. automaticallyImplyLeading: false,
  154. actions: [],
  155. flexibleSpace: FlexibleSpaceBar(
  156. background: wrapWithModel(
  157. model: _model.headerButtonsComponentModel,
  158. updateCallback: () => safeSetState(() {}),
  159. child: Builder(builder: (_) {
  160. return DebugFlutterFlowModelContext(
  161. rootModel: _model.rootModel,
  162. child: HeaderButtonsComponentWidget(),
  163. );
  164. }),
  165. ),
  166. centerTitle: true,
  167. expandedTitleScale: 1.0,
  168. ),
  169. bottom: PreferredSize(
  170. preferredSize: Size.fromHeight(70.0),
  171. child: Container(),
  172. ),
  173. toolbarHeight: MediaQuery.sizeOf(context).height * 0.25,
  174. elevation: 2.0,
  175. ),
  176. ),
  177. body: SafeArea(
  178. top: true,
  179. child: Column(
  180. mainAxisSize: MainAxisSize.max,
  181. children: [
  182. Expanded(
  183. child: Container(
  184. decoration: BoxDecoration(
  185. boxShadow: [
  186. BoxShadow(
  187. blurRadius: 4.0,
  188. color: Color(0x33000000),
  189. offset: Offset(
  190. 0.0,
  191. 2.0,
  192. ),
  193. )
  194. ],
  195. ),
  196. child: Column(
  197. children: [
  198. Align(
  199. alignment: Alignment(-1.0, 0),
  200. child: TabBar(
  201. isScrollable: true,
  202. tabAlignment: TabAlignment.start,
  203. labelColor: FlutterFlowTheme.of(context).primaryText,
  204. unselectedLabelColor:
  205. FlutterFlowTheme.of(context).secondaryText,
  206. labelStyle:
  207. FlutterFlowTheme.of(context).titleMedium.override(
  208. font: GoogleFonts.roboto(
  209. fontWeight: FlutterFlowTheme.of(context)
  210. .titleMedium
  211. .fontWeight,
  212. fontStyle: FlutterFlowTheme.of(context)
  213. .titleMedium
  214. .fontStyle,
  215. ),
  216. letterSpacing: 0.0,
  217. fontWeight: FlutterFlowTheme.of(context)
  218. .titleMedium
  219. .fontWeight,
  220. fontStyle: FlutterFlowTheme.of(context)
  221. .titleMedium
  222. .fontStyle,
  223. ),
  224. unselectedLabelStyle:
  225. FlutterFlowTheme.of(context).titleMedium.override(
  226. font: GoogleFonts.roboto(
  227. fontWeight: FlutterFlowTheme.of(context)
  228. .titleMedium
  229. .fontWeight,
  230. fontStyle: FlutterFlowTheme.of(context)
  231. .titleMedium
  232. .fontStyle,
  233. ),
  234. letterSpacing: 0.0,
  235. fontWeight: FlutterFlowTheme.of(context)
  236. .titleMedium
  237. .fontWeight,
  238. fontStyle: FlutterFlowTheme.of(context)
  239. .titleMedium
  240. .fontStyle,
  241. ),
  242. indicatorColor:
  243. FlutterFlowTheme.of(context).secondary,
  244. tabs: [
  245. Tab(
  246. text: FFLocalizations.of(context).getText(
  247. 'cfmj0g86' /* Activiteiten */,
  248. ),
  249. ),
  250. Tab(
  251. text: FFLocalizations.of(context).getText(
  252. 'od4c0ph1' /* Cultuur */,
  253. ),
  254. ),
  255. Tab(
  256. text: FFLocalizations.of(context).getText(
  257. 'i9cdclh1' /* Eetgelegenheden */,
  258. ),
  259. ),
  260. Tab(
  261. text: FFLocalizations.of(context).getText(
  262. '9s07bzb1' /* Overnachten */,
  263. ),
  264. ),
  265. Tab(
  266. text: FFLocalizations.of(context).getText(
  267. 'egcnfi7k' /* Uitgaan */,
  268. ),
  269. ),
  270. Tab(
  271. text: FFLocalizations.of(context).getText(
  272. '3i8p2r6z' /* Verhuur, catering */,
  273. ),
  274. ),
  275. ],
  276. controller: _model.tabBarController,
  277. onTap: (i) async {
  278. [
  279. () async {},
  280. () async {
  281. _model.tabCultuurGeladen = true;
  282. safeSetState(() {});
  283. _model.resultHorecaCultuur =
  284. await actions.fetchAlleHorecagelegenheden(
  285. '17963',
  286. widget!.plaats!,
  287. 'services_1',
  288. );
  289. _model.alleCultuur = _model.resultHorecaCultuur!
  290. .toList()
  291. .cast<dynamic>();
  292. safeSetState(() {});
  293. safeSetState(() {});
  294. },
  295. () async {
  296. _model.tabEetgelegenhedenGeladen = true;
  297. safeSetState(() {});
  298. _model.resultHorecaEetgelegenheden =
  299. await actions.fetchAlleHorecagelegenheden(
  300. '34',
  301. widget!.plaats!,
  302. 'services_1',
  303. );
  304. _model.alleEetgelegenheden = _model
  305. .resultHorecaEetgelegenheden!
  306. .toList()
  307. .cast<dynamic>();
  308. safeSetState(() {});
  309. safeSetState(() {});
  310. },
  311. () async {
  312. _model.tabOvernachtenGeladen = true;
  313. safeSetState(() {});
  314. _model.resultHorecaOvernachten =
  315. await actions.fetchAlleHorecagelegenheden(
  316. '17965',
  317. widget!.plaats!,
  318. 'services_1',
  319. );
  320. _model.alleOvernachten = _model
  321. .resultHorecaOvernachten!
  322. .toList()
  323. .cast<dynamic>();
  324. safeSetState(() {});
  325. safeSetState(() {});
  326. },
  327. () async {
  328. _model.tabUitgaanGeladen = true;
  329. safeSetState(() {});
  330. _model.resultHorecaUitgaansgelegenheden =
  331. await actions.fetchAlleHorecagelegenheden(
  332. '17967',
  333. widget!.plaats!,
  334. 'services_1',
  335. );
  336. _model.alleUitgaan = _model
  337. .resultHorecaUitgaansgelegenheden!
  338. .toList()
  339. .cast<dynamic>();
  340. safeSetState(() {});
  341. safeSetState(() {});
  342. },
  343. () async {
  344. _model.tabVerhuurcateringGeladen = true;
  345. safeSetState(() {});
  346. _model.resultHorecaVerhuur =
  347. await actions.fetchAlleHorecagelegenheden(
  348. '17968',
  349. widget!.plaats!,
  350. 'services_1',
  351. );
  352. _model.alleVerhuurCatering = _model
  353. .resultHorecaVerhuur!
  354. .toList()
  355. .cast<dynamic>();
  356. safeSetState(() {});
  357. safeSetState(() {});
  358. }
  359. ][i]();
  360. },
  361. ),
  362. ),
  363. Expanded(
  364. child: TabBarView(
  365. controller: _model.tabBarController,
  366. children: [
  367. Column(
  368. mainAxisSize: MainAxisSize.max,
  369. children: [
  370. Container(
  371. width: 200.0,
  372. child: TextFormField(
  373. controller: _model.textController1,
  374. focusNode: _model.textFieldFocusNode1,
  375. autofocus: false,
  376. enabled: true,
  377. obscureText: false,
  378. decoration: InputDecoration(
  379. isDense: true,
  380. labelStyle: FlutterFlowTheme.of(context)
  381. .labelMedium
  382. .override(
  383. font: GoogleFonts.roboto(
  384. fontWeight:
  385. FlutterFlowTheme.of(context)
  386. .labelMedium
  387. .fontWeight,
  388. fontStyle:
  389. FlutterFlowTheme.of(context)
  390. .labelMedium
  391. .fontStyle,
  392. ),
  393. letterSpacing: 0.0,
  394. fontWeight:
  395. FlutterFlowTheme.of(context)
  396. .labelMedium
  397. .fontWeight,
  398. fontStyle:
  399. FlutterFlowTheme.of(context)
  400. .labelMedium
  401. .fontStyle,
  402. ),
  403. hintText:
  404. FFLocalizations.of(context).getText(
  405. 'zk6al0vg' /* TextField */,
  406. ),
  407. hintStyle: FlutterFlowTheme.of(context)
  408. .labelMedium
  409. .override(
  410. font: GoogleFonts.roboto(
  411. fontWeight:
  412. FlutterFlowTheme.of(context)
  413. .labelMedium
  414. .fontWeight,
  415. fontStyle:
  416. FlutterFlowTheme.of(context)
  417. .labelMedium
  418. .fontStyle,
  419. ),
  420. letterSpacing: 0.0,
  421. fontWeight:
  422. FlutterFlowTheme.of(context)
  423. .labelMedium
  424. .fontWeight,
  425. fontStyle:
  426. FlutterFlowTheme.of(context)
  427. .labelMedium
  428. .fontStyle,
  429. ),
  430. enabledBorder: OutlineInputBorder(
  431. borderSide: BorderSide(
  432. color: Color(0x00000000),
  433. width: 1.0,
  434. ),
  435. borderRadius:
  436. BorderRadius.circular(8.0),
  437. ),
  438. focusedBorder: OutlineInputBorder(
  439. borderSide: BorderSide(
  440. color: Color(0x00000000),
  441. width: 1.0,
  442. ),
  443. borderRadius:
  444. BorderRadius.circular(8.0),
  445. ),
  446. errorBorder: OutlineInputBorder(
  447. borderSide: BorderSide(
  448. color: FlutterFlowTheme.of(context)
  449. .error,
  450. width: 1.0,
  451. ),
  452. borderRadius:
  453. BorderRadius.circular(8.0),
  454. ),
  455. focusedErrorBorder: OutlineInputBorder(
  456. borderSide: BorderSide(
  457. color: FlutterFlowTheme.of(context)
  458. .error,
  459. width: 1.0,
  460. ),
  461. borderRadius:
  462. BorderRadius.circular(8.0),
  463. ),
  464. filled: true,
  465. fillColor: FlutterFlowTheme.of(context)
  466. .secondaryBackground,
  467. ),
  468. style: FlutterFlowTheme.of(context)
  469. .bodyMedium
  470. .override(
  471. font: GoogleFonts.roboto(
  472. fontWeight:
  473. FlutterFlowTheme.of(context)
  474. .bodyMedium
  475. .fontWeight,
  476. fontStyle:
  477. FlutterFlowTheme.of(context)
  478. .bodyMedium
  479. .fontStyle,
  480. ),
  481. letterSpacing: 0.0,
  482. fontWeight:
  483. FlutterFlowTheme.of(context)
  484. .bodyMedium
  485. .fontWeight,
  486. fontStyle:
  487. FlutterFlowTheme.of(context)
  488. .bodyMedium
  489. .fontStyle,
  490. ),
  491. cursorColor: FlutterFlowTheme.of(context)
  492. .primaryText,
  493. enableInteractiveSelection: true,
  494. validator: _model.textController1Validator
  495. .asValidator(context),
  496. ),
  497. ),
  498. Expanded(
  499. child: FutureBuilder<ApiCallResponse>(
  500. future: HorecagelegenheidoverzichtCall.call(
  501. horcat: '17969',
  502. townid: widget!.plaats,
  503. ),
  504. builder: (context, snapshot) {
  505. // Customize what your widget looks like when it's loading.
  506. if (!snapshot.hasData) {
  507. return Center(
  508. child: SizedBox(
  509. width: 80.0,
  510. height: 80.0,
  511. child: SpinKitFadingCircle(
  512. color:
  513. FlutterFlowTheme.of(context)
  514. .primary,
  515. size: 80.0,
  516. ),
  517. ),
  518. );
  519. }
  520. final staggeredViewHorecagelegenheidoverzichtResponse =
  521. snapshot.data!;
  522. _model.debugBackendQueries[
  523. 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_ezq3lq60'] =
  524. debugSerializeParam(
  525. staggeredViewHorecagelegenheidoverzichtResponse
  526. .statusCode,
  527. ParamType.int,
  528. link:
  529. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  530. name: 'int',
  531. nullable: false,
  532. );
  533. _model.debugBackendQueries[
  534. 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_ezq3lq60'] =
  535. debugSerializeParam(
  536. staggeredViewHorecagelegenheidoverzichtResponse
  537. .bodyText,
  538. ParamType.String,
  539. link:
  540. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  541. name: 'String',
  542. nullable: false,
  543. );
  544. debugLogWidgetClass(_model);
  545. return Builder(
  546. builder: (context) {
  547. final horecagelegenheden =
  548. getJsonField(
  549. staggeredViewHorecagelegenheidoverzichtResponse
  550. .jsonBody,
  551. r'''$''',
  552. ).toList().take(25).toList();
  553. _model.debugGeneratorVariables[
  554. 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] =
  555. debugSerializeParam(
  556. horecagelegenheden.take(100),
  557. ParamType.JSON,
  558. isList: true,
  559. link:
  560. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  561. name: 'dynamic',
  562. nullable: false,
  563. );
  564. debugLogWidgetClass(_model);
  565. return MasonryGridView.builder(
  566. gridDelegate:
  567. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  568. crossAxisCount: () {
  569. if (MediaQuery.sizeOf(context)
  570. .width <
  571. kBreakpointSmall) {
  572. return 1;
  573. } else if (MediaQuery.sizeOf(
  574. context)
  575. .width <
  576. kBreakpointMedium) {
  577. return 1;
  578. } else if (MediaQuery.sizeOf(
  579. context)
  580. .width <
  581. kBreakpointLarge) {
  582. return 2;
  583. } else {
  584. return 3;
  585. }
  586. }(),
  587. ),
  588. crossAxisSpacing: 12.0,
  589. mainAxisSpacing: 12.0,
  590. itemCount:
  591. horecagelegenheden.length,
  592. itemBuilder: (context,
  593. horecagelegenhedenIndex) {
  594. final horecagelegenhedenItem =
  595. horecagelegenheden[
  596. horecagelegenhedenIndex];
  597. return Container(
  598. width: 600.0,
  599. height: 225.0,
  600. decoration: BoxDecoration(
  601. color: FlutterFlowTheme.of(
  602. context)
  603. .secondaryBackground,
  604. ),
  605. child: InkWell(
  606. splashColor:
  607. Colors.transparent,
  608. focusColor:
  609. Colors.transparent,
  610. hoverColor:
  611. Colors.transparent,
  612. highlightColor:
  613. Colors.transparent,
  614. onTap: () async {
  615. context.pushNamed(
  616. HorecagelegenheidCurrentWidget
  617. .routeName,
  618. queryParameters: {
  619. 'nid': serializeParam(
  620. getJsonField(
  621. horecagelegenhedenItem,
  622. r'''$.nid''',
  623. ).toString(),
  624. ParamType.String,
  625. ),
  626. }.withoutNulls,
  627. );
  628. },
  629. child: Builder(builder: (_) {
  630. return DebugFlutterFlowModelContext(
  631. rootModel:
  632. _model.rootModel,
  633. parentModelCallback: (m) {
  634. _model.horecagelegenheidoverzichtKaartModels1[
  635. 'Keyxu9_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m;
  636. },
  637. child:
  638. HorecagelegenheidoverzichtKaartWidget(
  639. key: Key(
  640. 'Keyxu9_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'),
  641. titel: getJsonField(
  642. horecagelegenhedenItem,
  643. r'''$.titel''',
  644. ).toString(),
  645. logo: getJsonField(
  646. horecagelegenhedenItem,
  647. r'''$.logo''',
  648. ).toString(),
  649. nid: getJsonField(
  650. horecagelegenhedenItem,
  651. r'''$.nid''',
  652. ).toString(),
  653. adres: getJsonField(
  654. horecagelegenhedenItem,
  655. r'''$.adres''',
  656. ).toString(),
  657. plaats: getJsonField(
  658. horecagelegenhedenItem,
  659. r'''$.plaats''',
  660. ).toString(),
  661. categorie:
  662. (getJsonField(
  663. horecagelegenhedenItem,
  664. r'''$.categorie''',
  665. true,
  666. ) as List?)
  667. ?.map<String>(
  668. (e) => e
  669. .toString())
  670. .toList()
  671. .cast<String>(),
  672. ),
  673. );
  674. }),
  675. ),
  676. );
  677. },
  678. );
  679. },
  680. );
  681. },
  682. ),
  683. ),
  684. ],
  685. ),
  686. Column(
  687. mainAxisSize: MainAxisSize.max,
  688. children: [
  689. Expanded(
  690. child: FutureBuilder<ApiCallResponse>(
  691. future: HorecagelegenheidoverzichtCall.call(
  692. horcat: '17963',
  693. townid: widget!.plaats,
  694. ),
  695. builder: (context, snapshot) {
  696. // Customize what your widget looks like when it's loading.
  697. if (!snapshot.hasData) {
  698. return Center(
  699. child: SizedBox(
  700. width: 80.0,
  701. height: 80.0,
  702. child: SpinKitFadingCircle(
  703. color:
  704. FlutterFlowTheme.of(context)
  705. .primary,
  706. size: 80.0,
  707. ),
  708. ),
  709. );
  710. }
  711. final staggeredViewHorecagelegenheidoverzichtResponse =
  712. snapshot.data!;
  713. _model.debugBackendQueries[
  714. 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_lvufq1md'] =
  715. debugSerializeParam(
  716. staggeredViewHorecagelegenheidoverzichtResponse
  717. .statusCode,
  718. ParamType.int,
  719. link:
  720. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  721. name: 'int',
  722. nullable: false,
  723. );
  724. _model.debugBackendQueries[
  725. 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_lvufq1md'] =
  726. debugSerializeParam(
  727. staggeredViewHorecagelegenheidoverzichtResponse
  728. .bodyText,
  729. ParamType.String,
  730. link:
  731. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  732. name: 'String',
  733. nullable: false,
  734. );
  735. debugLogWidgetClass(_model);
  736. return Builder(
  737. builder: (context) {
  738. final horecagelegenhedenCultuur =
  739. staggeredViewHorecagelegenheidoverzichtResponse
  740. .jsonBody
  741. .toList()
  742. .take(25)
  743. .toList();
  744. _model.debugGeneratorVariables[
  745. 'horecagelegenhedenCultuur${horecagelegenhedenCultuur.length > 100 ? ' (first 100)' : ''}'] =
  746. debugSerializeParam(
  747. horecagelegenhedenCultuur.take(100),
  748. ParamType.JSON,
  749. isList: true,
  750. link:
  751. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  752. name: 'dynamic',
  753. nullable: false,
  754. );
  755. debugLogWidgetClass(_model);
  756. return MasonryGridView.builder(
  757. gridDelegate:
  758. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  759. crossAxisCount: 2,
  760. ),
  761. crossAxisSpacing: 10.0,
  762. mainAxisSpacing: 10.0,
  763. itemCount: horecagelegenhedenCultuur
  764. .length,
  765. itemBuilder: (context,
  766. horecagelegenhedenCultuurIndex) {
  767. final horecagelegenhedenCultuurItem =
  768. horecagelegenhedenCultuur[
  769. horecagelegenhedenCultuurIndex];
  770. return Container(
  771. width: 100.0,
  772. height: 100.0,
  773. decoration: BoxDecoration(
  774. color: FlutterFlowTheme.of(
  775. context)
  776. .secondaryBackground,
  777. ),
  778. child: InkWell(
  779. splashColor:
  780. Colors.transparent,
  781. focusColor:
  782. Colors.transparent,
  783. hoverColor:
  784. Colors.transparent,
  785. highlightColor:
  786. Colors.transparent,
  787. onTap: () async {
  788. context.pushNamed(
  789. HorecagelegenheidCurrentWidget
  790. .routeName,
  791. queryParameters: {
  792. 'nid': serializeParam(
  793. getJsonField(
  794. horecagelegenhedenCultuurItem,
  795. r'''$.nid''',
  796. ).toString(),
  797. ParamType.String,
  798. ),
  799. }.withoutNulls,
  800. );
  801. },
  802. child: Builder(builder: (_) {
  803. return DebugFlutterFlowModelContext(
  804. rootModel:
  805. _model.rootModel,
  806. parentModelCallback: (m) {
  807. _model.horecagelegenheidoverzichtKaartModels2[
  808. 'Key5gz_${horecagelegenhedenCultuurIndex}_of_${horecagelegenhedenCultuur.length}'] = m;
  809. },
  810. child:
  811. HorecagelegenheidoverzichtKaartWidget(
  812. key: Key(
  813. 'Key5gz_${horecagelegenhedenCultuurIndex}_of_${horecagelegenhedenCultuur.length}'),
  814. titel: getJsonField(
  815. horecagelegenhedenCultuurItem,
  816. r'''$.titel''',
  817. ).toString(),
  818. logo: getJsonField(
  819. horecagelegenhedenCultuurItem,
  820. r'''$.logo''',
  821. ).toString(),
  822. nid: getJsonField(
  823. horecagelegenhedenCultuurItem,
  824. r'''$.nid''',
  825. ).toString(),
  826. adres: getJsonField(
  827. horecagelegenhedenCultuurItem,
  828. r'''$.adres''',
  829. ).toString(),
  830. plaats: getJsonField(
  831. horecagelegenhedenCultuurItem,
  832. r'''$.plaats''',
  833. ).toString(),
  834. categorie:
  835. (getJsonField(
  836. horecagelegenhedenCultuurItem,
  837. r'''$.categorie''',
  838. true,
  839. ) as List?)
  840. ?.map<String>(
  841. (e) => e
  842. .toString())
  843. .toList()
  844. .cast<String>(),
  845. ),
  846. );
  847. }),
  848. ),
  849. );
  850. },
  851. );
  852. },
  853. );
  854. },
  855. ),
  856. ),
  857. Container(
  858. width: 200.0,
  859. child: TextFormField(
  860. controller: _model.textController2,
  861. focusNode: _model.textFieldFocusNode2,
  862. autofocus: false,
  863. enabled: true,
  864. obscureText: false,
  865. decoration: InputDecoration(
  866. isDense: true,
  867. labelStyle: FlutterFlowTheme.of(context)
  868. .labelMedium
  869. .override(
  870. font: GoogleFonts.roboto(
  871. fontWeight:
  872. FlutterFlowTheme.of(context)
  873. .labelMedium
  874. .fontWeight,
  875. fontStyle:
  876. FlutterFlowTheme.of(context)
  877. .labelMedium
  878. .fontStyle,
  879. ),
  880. letterSpacing: 0.0,
  881. fontWeight:
  882. FlutterFlowTheme.of(context)
  883. .labelMedium
  884. .fontWeight,
  885. fontStyle:
  886. FlutterFlowTheme.of(context)
  887. .labelMedium
  888. .fontStyle,
  889. ),
  890. hintText:
  891. FFLocalizations.of(context).getText(
  892. '4hoz3fa1' /* TextField */,
  893. ),
  894. hintStyle: FlutterFlowTheme.of(context)
  895. .labelMedium
  896. .override(
  897. font: GoogleFonts.roboto(
  898. fontWeight:
  899. FlutterFlowTheme.of(context)
  900. .labelMedium
  901. .fontWeight,
  902. fontStyle:
  903. FlutterFlowTheme.of(context)
  904. .labelMedium
  905. .fontStyle,
  906. ),
  907. letterSpacing: 0.0,
  908. fontWeight:
  909. FlutterFlowTheme.of(context)
  910. .labelMedium
  911. .fontWeight,
  912. fontStyle:
  913. FlutterFlowTheme.of(context)
  914. .labelMedium
  915. .fontStyle,
  916. ),
  917. enabledBorder: OutlineInputBorder(
  918. borderSide: BorderSide(
  919. color: Color(0x00000000),
  920. width: 1.0,
  921. ),
  922. borderRadius:
  923. BorderRadius.circular(8.0),
  924. ),
  925. focusedBorder: OutlineInputBorder(
  926. borderSide: BorderSide(
  927. color: Color(0x00000000),
  928. width: 1.0,
  929. ),
  930. borderRadius:
  931. BorderRadius.circular(8.0),
  932. ),
  933. errorBorder: OutlineInputBorder(
  934. borderSide: BorderSide(
  935. color: FlutterFlowTheme.of(context)
  936. .error,
  937. width: 1.0,
  938. ),
  939. borderRadius:
  940. BorderRadius.circular(8.0),
  941. ),
  942. focusedErrorBorder: OutlineInputBorder(
  943. borderSide: BorderSide(
  944. color: FlutterFlowTheme.of(context)
  945. .error,
  946. width: 1.0,
  947. ),
  948. borderRadius:
  949. BorderRadius.circular(8.0),
  950. ),
  951. filled: true,
  952. fillColor: FlutterFlowTheme.of(context)
  953. .secondaryBackground,
  954. ),
  955. style: FlutterFlowTheme.of(context)
  956. .bodyMedium
  957. .override(
  958. font: GoogleFonts.roboto(
  959. fontWeight:
  960. FlutterFlowTheme.of(context)
  961. .bodyMedium
  962. .fontWeight,
  963. fontStyle:
  964. FlutterFlowTheme.of(context)
  965. .bodyMedium
  966. .fontStyle,
  967. ),
  968. letterSpacing: 0.0,
  969. fontWeight:
  970. FlutterFlowTheme.of(context)
  971. .bodyMedium
  972. .fontWeight,
  973. fontStyle:
  974. FlutterFlowTheme.of(context)
  975. .bodyMedium
  976. .fontStyle,
  977. ),
  978. cursorColor: FlutterFlowTheme.of(context)
  979. .primaryText,
  980. enableInteractiveSelection: true,
  981. validator: _model.textController2Validator
  982. .asValidator(context),
  983. ),
  984. ),
  985. ],
  986. ),
  987. Builder(
  988. builder: (context) {
  989. if (_model.tabEetgelegenhedenGeladen) {
  990. return Column(
  991. mainAxisSize: MainAxisSize.max,
  992. children: [
  993. Expanded(
  994. child: FutureBuilder<ApiCallResponse>(
  995. future: HorecagelegenheidoverzichtCall
  996. .call(
  997. horcat: '34',
  998. townid: widget!.plaats,
  999. ),
  1000. builder: (context, snapshot) {
  1001. // Customize what your widget looks like when it's loading.
  1002. if (!snapshot.hasData) {
  1003. return Center(
  1004. child: SizedBox(
  1005. width: 80.0,
  1006. height: 80.0,
  1007. child: SpinKitFadingCircle(
  1008. color: FlutterFlowTheme.of(
  1009. context)
  1010. .primary,
  1011. size: 80.0,
  1012. ),
  1013. ),
  1014. );
  1015. }
  1016. final staggeredViewHorecagelegenheidoverzichtResponse =
  1017. snapshot.data!;
  1018. _model.debugBackendQueries[
  1019. 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_n4zm8jsx'] =
  1020. debugSerializeParam(
  1021. staggeredViewHorecagelegenheidoverzichtResponse
  1022. .statusCode,
  1023. ParamType.int,
  1024. link:
  1025. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1026. name: 'int',
  1027. nullable: false,
  1028. );
  1029. _model.debugBackendQueries[
  1030. 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_n4zm8jsx'] =
  1031. debugSerializeParam(
  1032. staggeredViewHorecagelegenheidoverzichtResponse
  1033. .bodyText,
  1034. ParamType.String,
  1035. link:
  1036. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1037. name: 'String',
  1038. nullable: false,
  1039. );
  1040. debugLogWidgetClass(_model);
  1041. return Builder(
  1042. builder: (context) {
  1043. final horecagelegenheden =
  1044. getJsonField(
  1045. staggeredViewHorecagelegenheidoverzichtResponse
  1046. .jsonBody,
  1047. r'''$''',
  1048. ).toList().take(25).toList();
  1049. if (horecagelegenheden
  1050. .isEmpty) {
  1051. return Image.asset(
  1052. 'assets/images/logo800px.png',
  1053. );
  1054. }
  1055. _model.debugGeneratorVariables[
  1056. 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] =
  1057. debugSerializeParam(
  1058. horecagelegenheden.take(100),
  1059. ParamType.JSON,
  1060. isList: true,
  1061. link:
  1062. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1063. name: 'dynamic',
  1064. nullable: false,
  1065. );
  1066. debugLogWidgetClass(_model);
  1067. return MasonryGridView.builder(
  1068. gridDelegate:
  1069. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  1070. crossAxisCount: () {
  1071. if (MediaQuery.sizeOf(
  1072. context)
  1073. .width <
  1074. kBreakpointSmall) {
  1075. return 1;
  1076. } else if (MediaQuery
  1077. .sizeOf(
  1078. context)
  1079. .width <
  1080. kBreakpointMedium) {
  1081. return 1;
  1082. } else if (MediaQuery
  1083. .sizeOf(
  1084. context)
  1085. .width <
  1086. kBreakpointLarge) {
  1087. return 2;
  1088. } else {
  1089. return 3;
  1090. }
  1091. }(),
  1092. ),
  1093. crossAxisSpacing: 12.0,
  1094. mainAxisSpacing: 12.0,
  1095. itemCount:
  1096. horecagelegenheden.length,
  1097. itemBuilder: (context,
  1098. horecagelegenhedenIndex) {
  1099. final horecagelegenhedenItem =
  1100. horecagelegenheden[
  1101. horecagelegenhedenIndex];
  1102. return Container(
  1103. width: 600.0,
  1104. height: 225.0,
  1105. decoration: BoxDecoration(
  1106. color: FlutterFlowTheme
  1107. .of(context)
  1108. .secondaryBackground,
  1109. ),
  1110. child: InkWell(
  1111. splashColor:
  1112. Colors.transparent,
  1113. focusColor:
  1114. Colors.transparent,
  1115. hoverColor:
  1116. Colors.transparent,
  1117. highlightColor:
  1118. Colors.transparent,
  1119. onTap: () async {
  1120. context.pushNamed(
  1121. HorecagelegenheidCurrentWidget
  1122. .routeName,
  1123. queryParameters: {
  1124. 'nid':
  1125. serializeParam(
  1126. getJsonField(
  1127. horecagelegenhedenItem,
  1128. r'''$.nid''',
  1129. ).toString(),
  1130. ParamType
  1131. .String,
  1132. ),
  1133. }.withoutNulls,
  1134. );
  1135. },
  1136. child: Builder(
  1137. builder: (_) {
  1138. return DebugFlutterFlowModelContext(
  1139. rootModel: _model
  1140. .rootModel,
  1141. parentModelCallback:
  1142. (m) {
  1143. _model.horecagelegenheidoverzichtKaartModels3[
  1144. 'Key81b_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m;
  1145. },
  1146. child:
  1147. HorecagelegenheidoverzichtKaartWidget(
  1148. key: Key(
  1149. 'Key81b_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'),
  1150. titel:
  1151. getJsonField(
  1152. horecagelegenhedenItem,
  1153. r'''$.titel''',
  1154. ).toString(),
  1155. logo:
  1156. getJsonField(
  1157. horecagelegenhedenItem,
  1158. r'''$.logo''',
  1159. ).toString(),
  1160. nid: getJsonField(
  1161. horecagelegenhedenItem,
  1162. r'''$.nid''',
  1163. ).toString(),
  1164. adres:
  1165. getJsonField(
  1166. horecagelegenhedenItem,
  1167. r'''$.adres''',
  1168. ).toString(),
  1169. plaats:
  1170. getJsonField(
  1171. horecagelegenhedenItem,
  1172. r'''$.plaats''',
  1173. ).toString(),
  1174. categorie:
  1175. (getJsonField(
  1176. horecagelegenhedenItem,
  1177. r'''$.categorie''',
  1178. true,
  1179. ) as List?)
  1180. ?.map<String>(
  1181. (e) => e
  1182. .toString())
  1183. .toList()
  1184. .cast<
  1185. String>(),
  1186. ),
  1187. );
  1188. }),
  1189. ),
  1190. );
  1191. },
  1192. );
  1193. },
  1194. );
  1195. },
  1196. ),
  1197. ),
  1198. ],
  1199. );
  1200. } else {
  1201. return Container(
  1202. width: 100.0,
  1203. height: 100.0,
  1204. decoration: BoxDecoration(
  1205. color: FlutterFlowTheme.of(context)
  1206. .secondaryBackground,
  1207. ),
  1208. );
  1209. }
  1210. },
  1211. ),
  1212. Builder(
  1213. builder: (context) {
  1214. if (_model.tabOvernachtenGeladen) {
  1215. return Column(
  1216. mainAxisSize: MainAxisSize.max,
  1217. children: [
  1218. Expanded(
  1219. child: FutureBuilder<ApiCallResponse>(
  1220. future: HorecagelegenheidoverzichtCall
  1221. .call(
  1222. horcat: '17965',
  1223. townid: widget!.plaats,
  1224. ),
  1225. builder: (context, snapshot) {
  1226. // Customize what your widget looks like when it's loading.
  1227. if (!snapshot.hasData) {
  1228. return Center(
  1229. child: SizedBox(
  1230. width: 80.0,
  1231. height: 80.0,
  1232. child: SpinKitFadingCircle(
  1233. color: FlutterFlowTheme.of(
  1234. context)
  1235. .primary,
  1236. size: 80.0,
  1237. ),
  1238. ),
  1239. );
  1240. }
  1241. final staggeredViewHorecagelegenheidoverzichtResponse =
  1242. snapshot.data!;
  1243. _model.debugBackendQueries[
  1244. 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_51qs4ew3'] =
  1245. debugSerializeParam(
  1246. staggeredViewHorecagelegenheidoverzichtResponse
  1247. .statusCode,
  1248. ParamType.int,
  1249. link:
  1250. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1251. name: 'int',
  1252. nullable: false,
  1253. );
  1254. _model.debugBackendQueries[
  1255. 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_51qs4ew3'] =
  1256. debugSerializeParam(
  1257. staggeredViewHorecagelegenheidoverzichtResponse
  1258. .bodyText,
  1259. ParamType.String,
  1260. link:
  1261. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1262. name: 'String',
  1263. nullable: false,
  1264. );
  1265. debugLogWidgetClass(_model);
  1266. return Builder(
  1267. builder: (context) {
  1268. final horecagelegenheden =
  1269. getJsonField(
  1270. staggeredViewHorecagelegenheidoverzichtResponse
  1271. .jsonBody,
  1272. r'''$''',
  1273. ).toList().take(25).toList();
  1274. if (horecagelegenheden
  1275. .isEmpty) {
  1276. return Image.asset(
  1277. 'assets/images/logo800px.png',
  1278. );
  1279. }
  1280. _model.debugGeneratorVariables[
  1281. 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] =
  1282. debugSerializeParam(
  1283. horecagelegenheden.take(100),
  1284. ParamType.JSON,
  1285. isList: true,
  1286. link:
  1287. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1288. name: 'dynamic',
  1289. nullable: false,
  1290. );
  1291. debugLogWidgetClass(_model);
  1292. return MasonryGridView.builder(
  1293. gridDelegate:
  1294. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  1295. crossAxisCount: () {
  1296. if (MediaQuery.sizeOf(
  1297. context)
  1298. .width <
  1299. kBreakpointSmall) {
  1300. return 1;
  1301. } else if (MediaQuery
  1302. .sizeOf(
  1303. context)
  1304. .width <
  1305. kBreakpointMedium) {
  1306. return 1;
  1307. } else if (MediaQuery
  1308. .sizeOf(
  1309. context)
  1310. .width <
  1311. kBreakpointLarge) {
  1312. return 2;
  1313. } else {
  1314. return 3;
  1315. }
  1316. }(),
  1317. ),
  1318. crossAxisSpacing: 12.0,
  1319. mainAxisSpacing: 12.0,
  1320. itemCount:
  1321. horecagelegenheden.length,
  1322. itemBuilder: (context,
  1323. horecagelegenhedenIndex) {
  1324. final horecagelegenhedenItem =
  1325. horecagelegenheden[
  1326. horecagelegenhedenIndex];
  1327. return Container(
  1328. width: 600.0,
  1329. height: 225.0,
  1330. decoration: BoxDecoration(
  1331. color: FlutterFlowTheme
  1332. .of(context)
  1333. .secondaryBackground,
  1334. ),
  1335. child: InkWell(
  1336. splashColor:
  1337. Colors.transparent,
  1338. focusColor:
  1339. Colors.transparent,
  1340. hoverColor:
  1341. Colors.transparent,
  1342. highlightColor:
  1343. Colors.transparent,
  1344. onTap: () async {
  1345. context.pushNamed(
  1346. HorecagelegenheidCurrentWidget
  1347. .routeName,
  1348. queryParameters: {
  1349. 'nid':
  1350. serializeParam(
  1351. getJsonField(
  1352. horecagelegenhedenItem,
  1353. r'''$.nid''',
  1354. ).toString(),
  1355. ParamType
  1356. .String,
  1357. ),
  1358. }.withoutNulls,
  1359. );
  1360. },
  1361. child: Builder(
  1362. builder: (_) {
  1363. return DebugFlutterFlowModelContext(
  1364. rootModel: _model
  1365. .rootModel,
  1366. parentModelCallback:
  1367. (m) {
  1368. _model.horecagelegenheidoverzichtKaartModels4[
  1369. 'Keyqfe_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m;
  1370. },
  1371. child:
  1372. HorecagelegenheidoverzichtKaartWidget(
  1373. key: Key(
  1374. 'Keyqfe_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'),
  1375. titel:
  1376. getJsonField(
  1377. horecagelegenhedenItem,
  1378. r'''$.titel''',
  1379. ).toString(),
  1380. logo:
  1381. getJsonField(
  1382. horecagelegenhedenItem,
  1383. r'''$.logo''',
  1384. ).toString(),
  1385. nid: getJsonField(
  1386. horecagelegenhedenItem,
  1387. r'''$.nid''',
  1388. ).toString(),
  1389. adres:
  1390. getJsonField(
  1391. horecagelegenhedenItem,
  1392. r'''$.adres''',
  1393. ).toString(),
  1394. plaats:
  1395. getJsonField(
  1396. horecagelegenhedenItem,
  1397. r'''$.plaats''',
  1398. ).toString(),
  1399. categorie:
  1400. (getJsonField(
  1401. horecagelegenhedenItem,
  1402. r'''$.categorie''',
  1403. true,
  1404. ) as List?)
  1405. ?.map<String>(
  1406. (e) => e
  1407. .toString())
  1408. .toList()
  1409. .cast<
  1410. String>(),
  1411. ),
  1412. );
  1413. }),
  1414. ),
  1415. );
  1416. },
  1417. );
  1418. },
  1419. );
  1420. },
  1421. ),
  1422. ),
  1423. ],
  1424. );
  1425. } else {
  1426. return Container(
  1427. width: 100.0,
  1428. height: 100.0,
  1429. decoration: BoxDecoration(
  1430. color: FlutterFlowTheme.of(context)
  1431. .secondaryBackground,
  1432. ),
  1433. );
  1434. }
  1435. },
  1436. ),
  1437. Builder(
  1438. builder: (context) {
  1439. if (_model.tabUitgaanGeladen) {
  1440. return Column(
  1441. mainAxisSize: MainAxisSize.max,
  1442. children: [
  1443. Expanded(
  1444. child: FutureBuilder<ApiCallResponse>(
  1445. future: HorecagelegenheidoverzichtCall
  1446. .call(
  1447. horcat: '17967',
  1448. townid:
  1449. FFAppState().provincieSelectId,
  1450. ),
  1451. builder: (context, snapshot) {
  1452. // Customize what your widget looks like when it's loading.
  1453. if (!snapshot.hasData) {
  1454. return Center(
  1455. child: SizedBox(
  1456. width: 80.0,
  1457. height: 80.0,
  1458. child: SpinKitFadingCircle(
  1459. color: FlutterFlowTheme.of(
  1460. context)
  1461. .primary,
  1462. size: 80.0,
  1463. ),
  1464. ),
  1465. );
  1466. }
  1467. final staggeredViewHorecagelegenheidoverzichtResponse =
  1468. snapshot.data!;
  1469. _model.debugBackendQueries[
  1470. 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_2y8hmnf7'] =
  1471. debugSerializeParam(
  1472. staggeredViewHorecagelegenheidoverzichtResponse
  1473. .statusCode,
  1474. ParamType.int,
  1475. link:
  1476. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1477. name: 'int',
  1478. nullable: false,
  1479. );
  1480. _model.debugBackendQueries[
  1481. 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_2y8hmnf7'] =
  1482. debugSerializeParam(
  1483. staggeredViewHorecagelegenheidoverzichtResponse
  1484. .bodyText,
  1485. ParamType.String,
  1486. link:
  1487. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1488. name: 'String',
  1489. nullable: false,
  1490. );
  1491. debugLogWidgetClass(_model);
  1492. return Builder(
  1493. builder: (context) {
  1494. final horecagelegenheden =
  1495. getJsonField(
  1496. staggeredViewHorecagelegenheidoverzichtResponse
  1497. .jsonBody,
  1498. r'''$''',
  1499. ).toList().take(25).toList();
  1500. if (horecagelegenheden
  1501. .isEmpty) {
  1502. return Image.asset(
  1503. 'assets/images/logo800px.png',
  1504. );
  1505. }
  1506. _model.debugGeneratorVariables[
  1507. 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] =
  1508. debugSerializeParam(
  1509. horecagelegenheden.take(100),
  1510. ParamType.JSON,
  1511. isList: true,
  1512. link:
  1513. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1514. name: 'dynamic',
  1515. nullable: false,
  1516. );
  1517. debugLogWidgetClass(_model);
  1518. return MasonryGridView.builder(
  1519. gridDelegate:
  1520. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  1521. crossAxisCount: () {
  1522. if (MediaQuery.sizeOf(
  1523. context)
  1524. .width <
  1525. kBreakpointSmall) {
  1526. return 1;
  1527. } else if (MediaQuery
  1528. .sizeOf(
  1529. context)
  1530. .width <
  1531. kBreakpointMedium) {
  1532. return 1;
  1533. } else if (MediaQuery
  1534. .sizeOf(
  1535. context)
  1536. .width <
  1537. kBreakpointLarge) {
  1538. return 2;
  1539. } else {
  1540. return 3;
  1541. }
  1542. }(),
  1543. ),
  1544. crossAxisSpacing: 12.0,
  1545. mainAxisSpacing: 12.0,
  1546. itemCount:
  1547. horecagelegenheden.length,
  1548. itemBuilder: (context,
  1549. horecagelegenhedenIndex) {
  1550. final horecagelegenhedenItem =
  1551. horecagelegenheden[
  1552. horecagelegenhedenIndex];
  1553. return Container(
  1554. width: 600.0,
  1555. height: 225.0,
  1556. decoration: BoxDecoration(
  1557. color: FlutterFlowTheme
  1558. .of(context)
  1559. .secondaryBackground,
  1560. ),
  1561. child: InkWell(
  1562. splashColor:
  1563. Colors.transparent,
  1564. focusColor:
  1565. Colors.transparent,
  1566. hoverColor:
  1567. Colors.transparent,
  1568. highlightColor:
  1569. Colors.transparent,
  1570. onTap: () async {
  1571. context.pushNamed(
  1572. HorecagelegenheidCurrentWidget
  1573. .routeName,
  1574. queryParameters: {
  1575. 'nid':
  1576. serializeParam(
  1577. getJsonField(
  1578. horecagelegenhedenItem,
  1579. r'''$.nid''',
  1580. ).toString(),
  1581. ParamType
  1582. .String,
  1583. ),
  1584. }.withoutNulls,
  1585. );
  1586. },
  1587. child: Builder(
  1588. builder: (_) {
  1589. return DebugFlutterFlowModelContext(
  1590. rootModel: _model
  1591. .rootModel,
  1592. parentModelCallback:
  1593. (m) {
  1594. _model.horecagelegenheidoverzichtKaartModels5[
  1595. 'Key81q_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m;
  1596. },
  1597. child:
  1598. HorecagelegenheidoverzichtKaartWidget(
  1599. key: Key(
  1600. 'Key81q_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'),
  1601. titel:
  1602. getJsonField(
  1603. horecagelegenhedenItem,
  1604. r'''$.titel''',
  1605. ).toString(),
  1606. logo:
  1607. getJsonField(
  1608. horecagelegenhedenItem,
  1609. r'''$.logo''',
  1610. ).toString(),
  1611. nid: getJsonField(
  1612. horecagelegenhedenItem,
  1613. r'''$.nid''',
  1614. ).toString(),
  1615. adres:
  1616. getJsonField(
  1617. horecagelegenhedenItem,
  1618. r'''$.adres''',
  1619. ).toString(),
  1620. plaats:
  1621. getJsonField(
  1622. horecagelegenhedenItem,
  1623. r'''$.plaats''',
  1624. ).toString(),
  1625. categorie:
  1626. (getJsonField(
  1627. horecagelegenhedenItem,
  1628. r'''$.categorie''',
  1629. true,
  1630. ) as List?)
  1631. ?.map<String>(
  1632. (e) => e
  1633. .toString())
  1634. .toList()
  1635. .cast<
  1636. String>(),
  1637. ),
  1638. );
  1639. }),
  1640. ),
  1641. );
  1642. },
  1643. );
  1644. },
  1645. );
  1646. },
  1647. ),
  1648. ),
  1649. ],
  1650. );
  1651. } else {
  1652. return Container(
  1653. width: 100.0,
  1654. height: 100.0,
  1655. decoration: BoxDecoration(
  1656. color: FlutterFlowTheme.of(context)
  1657. .secondaryBackground,
  1658. ),
  1659. );
  1660. }
  1661. },
  1662. ),
  1663. Builder(
  1664. builder: (context) {
  1665. if (_model.tabVerhuurcateringGeladen) {
  1666. return Column(
  1667. mainAxisSize: MainAxisSize.max,
  1668. children: [
  1669. Expanded(
  1670. child: FutureBuilder<ApiCallResponse>(
  1671. future: HorecagelegenheidoverzichtCall
  1672. .call(
  1673. horcat: '17968',
  1674. townid: widget!.plaats,
  1675. ),
  1676. builder: (context, snapshot) {
  1677. // Customize what your widget looks like when it's loading.
  1678. if (!snapshot.hasData) {
  1679. return Center(
  1680. child: SizedBox(
  1681. width: 80.0,
  1682. height: 80.0,
  1683. child: SpinKitFadingCircle(
  1684. color: FlutterFlowTheme.of(
  1685. context)
  1686. .primary,
  1687. size: 80.0,
  1688. ),
  1689. ),
  1690. );
  1691. }
  1692. final staggeredViewHorecagelegenheidoverzichtResponse =
  1693. snapshot.data!;
  1694. _model.debugBackendQueries[
  1695. 'HorecagelegenheidoverzichtCall_statusCode_StaggeredView_9f73d118'] =
  1696. debugSerializeParam(
  1697. staggeredViewHorecagelegenheidoverzichtResponse
  1698. .statusCode,
  1699. ParamType.int,
  1700. link:
  1701. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1702. name: 'int',
  1703. nullable: false,
  1704. );
  1705. _model.debugBackendQueries[
  1706. 'HorecagelegenheidoverzichtCall_responseBody_StaggeredView_9f73d118'] =
  1707. debugSerializeParam(
  1708. staggeredViewHorecagelegenheidoverzichtResponse
  1709. .bodyText,
  1710. ParamType.String,
  1711. link:
  1712. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1713. name: 'String',
  1714. nullable: false,
  1715. );
  1716. debugLogWidgetClass(_model);
  1717. return Builder(
  1718. builder: (context) {
  1719. final horecagelegenheden =
  1720. getJsonField(
  1721. staggeredViewHorecagelegenheidoverzichtResponse
  1722. .jsonBody,
  1723. r'''$''',
  1724. ).toList().take(25).toList();
  1725. if (horecagelegenheden
  1726. .isEmpty) {
  1727. return Image.asset(
  1728. 'assets/images/logo800px.png',
  1729. );
  1730. }
  1731. _model.debugGeneratorVariables[
  1732. 'horecagelegenheden${horecagelegenheden.length > 100 ? ' (first 100)' : ''}'] =
  1733. debugSerializeParam(
  1734. horecagelegenheden.take(100),
  1735. ParamType.JSON,
  1736. isList: true,
  1737. link:
  1738. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=HorecagelegenhedenOverzicht',
  1739. name: 'dynamic',
  1740. nullable: false,
  1741. );
  1742. debugLogWidgetClass(_model);
  1743. return MasonryGridView.builder(
  1744. gridDelegate:
  1745. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  1746. crossAxisCount: () {
  1747. if (MediaQuery.sizeOf(
  1748. context)
  1749. .width <
  1750. kBreakpointSmall) {
  1751. return 1;
  1752. } else if (MediaQuery
  1753. .sizeOf(
  1754. context)
  1755. .width <
  1756. kBreakpointMedium) {
  1757. return 1;
  1758. } else if (MediaQuery
  1759. .sizeOf(
  1760. context)
  1761. .width <
  1762. kBreakpointLarge) {
  1763. return 2;
  1764. } else {
  1765. return 3;
  1766. }
  1767. }(),
  1768. ),
  1769. crossAxisSpacing: 12.0,
  1770. mainAxisSpacing: 12.0,
  1771. itemCount:
  1772. horecagelegenheden.length,
  1773. itemBuilder: (context,
  1774. horecagelegenhedenIndex) {
  1775. final horecagelegenhedenItem =
  1776. horecagelegenheden[
  1777. horecagelegenhedenIndex];
  1778. return Container(
  1779. width: 600.0,
  1780. height: 225.0,
  1781. decoration: BoxDecoration(
  1782. color: FlutterFlowTheme
  1783. .of(context)
  1784. .secondaryBackground,
  1785. ),
  1786. child: InkWell(
  1787. splashColor:
  1788. Colors.transparent,
  1789. focusColor:
  1790. Colors.transparent,
  1791. hoverColor:
  1792. Colors.transparent,
  1793. highlightColor:
  1794. Colors.transparent,
  1795. onTap: () async {
  1796. context.pushNamed(
  1797. HorecagelegenheidCurrentWidget
  1798. .routeName,
  1799. queryParameters: {
  1800. 'nid':
  1801. serializeParam(
  1802. getJsonField(
  1803. horecagelegenhedenItem,
  1804. r'''$.nid''',
  1805. ).toString(),
  1806. ParamType
  1807. .String,
  1808. ),
  1809. }.withoutNulls,
  1810. );
  1811. },
  1812. child: Builder(
  1813. builder: (_) {
  1814. return DebugFlutterFlowModelContext(
  1815. rootModel: _model
  1816. .rootModel,
  1817. parentModelCallback:
  1818. (m) {
  1819. _model.horecagelegenheidoverzichtKaartModels6[
  1820. 'Keykrk_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'] = m;
  1821. },
  1822. child:
  1823. HorecagelegenheidoverzichtKaartWidget(
  1824. key: Key(
  1825. 'Keykrk_${horecagelegenhedenIndex}_of_${horecagelegenheden.length}'),
  1826. titel:
  1827. getJsonField(
  1828. horecagelegenhedenItem,
  1829. r'''$.titel''',
  1830. ).toString(),
  1831. logo:
  1832. getJsonField(
  1833. horecagelegenhedenItem,
  1834. r'''$.logo''',
  1835. ).toString(),
  1836. nid: getJsonField(
  1837. horecagelegenhedenItem,
  1838. r'''$.nid''',
  1839. ).toString(),
  1840. adres:
  1841. getJsonField(
  1842. horecagelegenhedenItem,
  1843. r'''$.adres''',
  1844. ).toString(),
  1845. plaats:
  1846. getJsonField(
  1847. horecagelegenhedenItem,
  1848. r'''$.plaats''',
  1849. ).toString(),
  1850. categorie:
  1851. (getJsonField(
  1852. horecagelegenhedenItem,
  1853. r'''$.categorie''',
  1854. true,
  1855. ) as List?)
  1856. ?.map<String>(
  1857. (e) => e
  1858. .toString())
  1859. .toList()
  1860. .cast<
  1861. String>(),
  1862. ),
  1863. );
  1864. }),
  1865. ),
  1866. );
  1867. },
  1868. );
  1869. },
  1870. );
  1871. },
  1872. ),
  1873. ),
  1874. ],
  1875. );
  1876. } else {
  1877. return Container(
  1878. width: 100.0,
  1879. height: 100.0,
  1880. decoration: BoxDecoration(
  1881. color: FlutterFlowTheme.of(context)
  1882. .secondaryBackground,
  1883. ),
  1884. );
  1885. }
  1886. },
  1887. ),
  1888. ],
  1889. ),
  1890. ),
  1891. ],
  1892. ),
  1893. ),
  1894. ),
  1895. ],
  1896. ),
  1897. ),
  1898. ),
  1899. );
  1900. }
  1901. }