horecagelegenheden_overzicht_widget.dart 117 KB

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