horecagelegenheden_overzicht_widget.dart 117 KB

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