favorieten_widget.dart 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114
  1. import '/components/header_buttons_component_widget.dart';
  2. import '/flutter_flow/flutter_flow_theme.dart';
  3. import '/flutter_flow/flutter_flow_util.dart';
  4. import '/flutter_flow/flutter_flow_widgets.dart';
  5. import '/horecagelegenhedenoverzicht/horecagelegenheidoverzicht_kaart/horecagelegenheidoverzicht_kaart_widget.dart';
  6. import '/shared/drawer_component/drawer_component_widget.dart';
  7. import '/uitgaanspaginas/uitgaantabel_kaart/uitgaantabel_kaart_widget.dart';
  8. import 'dart:async';
  9. import 'dart:ui';
  10. import '/custom_code/actions/index.dart' as actions;
  11. import '/flutter_flow/custom_functions.dart' as functions;
  12. import '/index.dart';
  13. import 'package:flutter/material.dart';
  14. import 'package:flutter/scheduler.dart';
  15. import 'package:flutter_spinkit/flutter_spinkit.dart';
  16. import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
  17. import 'package:google_fonts/google_fonts.dart';
  18. import 'package:provider/provider.dart';
  19. import 'favorieten_model.dart';
  20. export 'favorieten_model.dart';
  21. class FavorietenWidget extends StatefulWidget {
  22. const FavorietenWidget({super.key});
  23. static String routeName = 'favorieten';
  24. static String routePath = '/favorieten';
  25. @override
  26. State<FavorietenWidget> createState() => _FavorietenWidgetState();
  27. }
  28. class _FavorietenWidgetState extends State<FavorietenWidget>
  29. with TickerProviderStateMixin, RouteAware {
  30. late FavorietenModel _model;
  31. final scaffoldKey = GlobalKey<ScaffoldState>();
  32. @override
  33. void initState() {
  34. super.initState();
  35. _model = createModel(context, () => FavorietenModel());
  36. // On page load action.
  37. SchedulerBinding.instance.addPostFrameCallback((_) async {
  38. _model.responseActionDrupalRequestPageLoad = await actions.drupalRequest(
  39. 'GET',
  40. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_agenda.json',
  41. FFAppState().userSessionname,
  42. FFAppState().userSessionid,
  43. FFAppState().userToken,
  44. '',
  45. );
  46. _model.favorietenAgenda =
  47. _model.responseActionDrupalRequestPageLoad!.toList().cast<dynamic>();
  48. safeSetState(() {});
  49. });
  50. _model.tabBarController = TabController(
  51. vsync: this,
  52. length: 4,
  53. initialIndex: 0,
  54. )
  55. ..addListener(() => safeSetState(() {}))
  56. ..addListener(() {
  57. debugLogWidgetClass(_model);
  58. });
  59. }
  60. @override
  61. void dispose() {
  62. routeObserver.unsubscribe(this);
  63. _model.dispose();
  64. super.dispose();
  65. }
  66. @override
  67. void didUpdateWidget(FavorietenWidget oldWidget) {
  68. super.didUpdateWidget(oldWidget);
  69. _model.widget = widget;
  70. }
  71. @override
  72. void didChangeDependencies() {
  73. super.didChangeDependencies();
  74. final route = DebugModalRoute.of(context);
  75. if (route != null) {
  76. routeObserver.subscribe(this, route);
  77. }
  78. debugLogGlobalProperty(context);
  79. }
  80. @override
  81. void didPopNext() {
  82. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  83. setState(() => _model.isRouteVisible = true);
  84. debugLogWidgetClass(_model);
  85. }
  86. }
  87. @override
  88. void didPush() {
  89. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  90. setState(() => _model.isRouteVisible = true);
  91. debugLogWidgetClass(_model);
  92. }
  93. }
  94. @override
  95. void didPop() {
  96. _model.isRouteVisible = false;
  97. }
  98. @override
  99. void didPushNext() {
  100. _model.isRouteVisible = false;
  101. }
  102. @override
  103. Widget build(BuildContext context) {
  104. DebugFlutterFlowModelContext.maybeOf(context)
  105. ?.parentModelCallback
  106. ?.call(_model);
  107. context.watch<FFAppState>();
  108. _model.uitgaantabelKaartModels.clear();
  109. _model.horecagelegenheidoverzichtKaartModels.clear();
  110. return GestureDetector(
  111. onTap: () {
  112. FocusScope.of(context).unfocus();
  113. FocusManager.instance.primaryFocus?.unfocus();
  114. },
  115. child: Scaffold(
  116. key: scaffoldKey,
  117. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  118. drawer: Drawer(
  119. elevation: 16.0,
  120. child: wrapWithModel(
  121. model: _model.drawerComponentModel,
  122. updateCallback: () => safeSetState(() {}),
  123. child: Builder(builder: (_) {
  124. return DebugFlutterFlowModelContext(
  125. rootModel: _model.rootModel,
  126. child: DrawerComponentWidget(),
  127. );
  128. }),
  129. ),
  130. ),
  131. appBar: PreferredSize(
  132. preferredSize: Size.fromHeight(80.0),
  133. child: AppBar(
  134. backgroundColor: FlutterFlowTheme.of(context).info,
  135. automaticallyImplyLeading: false,
  136. actions: [],
  137. flexibleSpace: FlexibleSpaceBar(
  138. title: wrapWithModel(
  139. model: _model.headerButtonsComponentModel,
  140. updateCallback: () => safeSetState(() {}),
  141. child: Builder(builder: (_) {
  142. return DebugFlutterFlowModelContext(
  143. rootModel: _model.rootModel,
  144. child: HeaderButtonsComponentWidget(
  145. showBackButton: false,
  146. ),
  147. );
  148. }),
  149. ),
  150. centerTitle: true,
  151. expandedTitleScale: 1.0,
  152. ),
  153. elevation: 0.0,
  154. ),
  155. ),
  156. body: SafeArea(
  157. top: true,
  158. child: Column(
  159. mainAxisSize: MainAxisSize.max,
  160. children: [
  161. Expanded(
  162. child: Column(
  163. children: [
  164. Align(
  165. alignment: Alignment(0.0, 0),
  166. child: TabBar(
  167. isScrollable: true,
  168. tabAlignment: TabAlignment.center,
  169. labelColor: FlutterFlowTheme.of(context).primaryText,
  170. unselectedLabelColor:
  171. FlutterFlowTheme.of(context).secondaryText,
  172. labelStyle:
  173. FlutterFlowTheme.of(context).titleMedium.override(
  174. font: GoogleFonts.roboto(
  175. fontWeight: FlutterFlowTheme.of(context)
  176. .titleMedium
  177. .fontWeight,
  178. fontStyle: FlutterFlowTheme.of(context)
  179. .titleMedium
  180. .fontStyle,
  181. ),
  182. letterSpacing: 0.0,
  183. fontWeight: FlutterFlowTheme.of(context)
  184. .titleMedium
  185. .fontWeight,
  186. fontStyle: FlutterFlowTheme.of(context)
  187. .titleMedium
  188. .fontStyle,
  189. ),
  190. unselectedLabelStyle:
  191. FlutterFlowTheme.of(context).titleMedium.override(
  192. font: GoogleFonts.roboto(
  193. fontWeight: FlutterFlowTheme.of(context)
  194. .titleMedium
  195. .fontWeight,
  196. fontStyle: FlutterFlowTheme.of(context)
  197. .titleMedium
  198. .fontStyle,
  199. ),
  200. letterSpacing: 0.0,
  201. fontWeight: FlutterFlowTheme.of(context)
  202. .titleMedium
  203. .fontWeight,
  204. fontStyle: FlutterFlowTheme.of(context)
  205. .titleMedium
  206. .fontStyle,
  207. ),
  208. indicatorColor: FlutterFlowTheme.of(context).secondary,
  209. tabs: [
  210. Tab(
  211. text: FFLocalizations.of(context).getText(
  212. 'txq7zl0f' /* Persoonlijke agenda */,
  213. ),
  214. ),
  215. Tab(
  216. text: FFLocalizations.of(context).getText(
  217. '9wq117bv' /* Favoriete gemeenten */,
  218. ),
  219. ),
  220. Tab(
  221. text: FFLocalizations.of(context).getText(
  222. 'ygk8aifq' /* Favoriete Gelegenheden */,
  223. ),
  224. ),
  225. Tab(
  226. text: FFLocalizations.of(context).getText(
  227. 'jwojezxv' /* Gebruiker */,
  228. ),
  229. ),
  230. ],
  231. controller: _model.tabBarController,
  232. onTap: (i) async {
  233. [
  234. () async {
  235. _model.responsActionDrupalRequest =
  236. await actions.drupalRequest(
  237. 'GET',
  238. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_agenda.json',
  239. FFAppState().userSessionname,
  240. FFAppState().userSessionid,
  241. FFAppState().userToken,
  242. '',
  243. );
  244. _model.favorietenAgenda = _model
  245. .responsActionDrupalRequest!
  246. .toList()
  247. .cast<dynamic>();
  248. safeSetState(() {});
  249. safeSetState(() {});
  250. },
  251. () async {
  252. _model.resultFavorietegemeenten =
  253. await actions.drupalRequest(
  254. 'GET',
  255. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_gemeenten.json',
  256. FFAppState().userSessionname,
  257. FFAppState().userSessionid,
  258. FFAppState().userToken,
  259. '',
  260. );
  261. _model.favorietenGemeenten = _model
  262. .resultFavorietegemeenten!
  263. .toList()
  264. .cast<dynamic>();
  265. safeSetState(() {});
  266. safeSetState(() {});
  267. },
  268. () async {
  269. _model.responseFavorieteHoreca =
  270. await actions.drupalRequest(
  271. 'GET',
  272. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_horeca.json',
  273. FFAppState().userSessionname,
  274. FFAppState().userSessionid,
  275. FFAppState().userToken,
  276. '',
  277. );
  278. _model.favorieteHorecagelegenheden = _model
  279. .responseFavorieteHoreca!
  280. .toList()
  281. .cast<dynamic>();
  282. safeSetState(() {});
  283. safeSetState(() {});
  284. },
  285. () async {}
  286. ][i]();
  287. },
  288. ),
  289. ),
  290. Expanded(
  291. child: TabBarView(
  292. controller: _model.tabBarController,
  293. children: [
  294. Column(
  295. mainAxisSize: MainAxisSize.max,
  296. children: [
  297. Expanded(
  298. child: Builder(
  299. builder: (context) {
  300. final favorietenAgendaItems =
  301. _model.favorietenAgenda.toList();
  302. _model.debugGeneratorVariables[
  303. 'favorietenAgendaItems${favorietenAgendaItems.length > 100 ? ' (first 100)' : ''}'] =
  304. debugSerializeParam(
  305. favorietenAgendaItems.take(100),
  306. ParamType.JSON,
  307. isList: true,
  308. link:
  309. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  310. name: 'dynamic',
  311. nullable: false,
  312. );
  313. debugLogWidgetClass(_model);
  314. return MasonryGridView.builder(
  315. gridDelegate:
  316. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  317. crossAxisCount: () {
  318. if (MediaQuery.sizeOf(context).width <
  319. kBreakpointSmall) {
  320. return 1;
  321. } else if (MediaQuery.sizeOf(context)
  322. .width <
  323. kBreakpointMedium) {
  324. return 1;
  325. } else if (MediaQuery.sizeOf(context)
  326. .width <
  327. kBreakpointLarge) {
  328. return 2;
  329. } else {
  330. return 3;
  331. }
  332. }(),
  333. ),
  334. crossAxisSpacing: 10.0,
  335. mainAxisSpacing: 10.0,
  336. itemCount: favorietenAgendaItems.length,
  337. itemBuilder: (context,
  338. favorietenAgendaItemsIndex) {
  339. final favorietenAgendaItemsItem =
  340. favorietenAgendaItems[
  341. favorietenAgendaItemsIndex];
  342. return Builder(builder: (_) {
  343. return DebugFlutterFlowModelContext(
  344. rootModel: _model.rootModel,
  345. parentModelCallback: (m) {
  346. _model.uitgaantabelKaartModels[
  347. 'Keyiv6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'] = m;
  348. },
  349. child: UitgaantabelKaartWidget(
  350. key: Key(
  351. 'Keyiv6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'),
  352. logo: getJsonField(
  353. favorietenAgendaItemsItem,
  354. r'''$.logo''',
  355. ),
  356. categorie: getJsonField(
  357. favorietenAgendaItemsItem,
  358. r'''$.categorie''',
  359. ),
  360. titel: getJsonField(
  361. favorietenAgendaItemsItem,
  362. r'''$.titel''',
  363. ),
  364. horecagelegenheid: getJsonField(
  365. favorietenAgendaItemsItem,
  366. r'''$.horecagelegenheid''',
  367. ),
  368. adres: getJsonField(
  369. favorietenAgendaItemsItem,
  370. r'''$.adres''',
  371. ),
  372. plaats: getJsonField(
  373. favorietenAgendaItemsItem,
  374. r'''$.plaats''',
  375. ),
  376. datum: getJsonField(
  377. favorietenAgendaItemsItem,
  378. r'''$.datum''',
  379. ),
  380. inhoud: null,
  381. nid: getJsonField(
  382. favorietenAgendaItemsItem,
  383. r'''$.nid''',
  384. ),
  385. horecagelegenheidNid:
  386. getJsonField(
  387. favorietenAgendaItemsItem,
  388. r'''$.horecagelegenheidNid''',
  389. ),
  390. ),
  391. );
  392. });
  393. },
  394. );
  395. },
  396. ),
  397. ),
  398. Text(
  399. FFLocalizations.of(context).getText(
  400. 'wmho8j7h' /* Hello World */,
  401. ),
  402. style: FlutterFlowTheme.of(context)
  403. .bodyMedium
  404. .override(
  405. font: GoogleFonts.roboto(
  406. fontWeight: FlutterFlowTheme.of(context)
  407. .bodyMedium
  408. .fontWeight,
  409. fontStyle: FlutterFlowTheme.of(context)
  410. .bodyMedium
  411. .fontStyle,
  412. ),
  413. letterSpacing: 0.0,
  414. fontWeight: FlutterFlowTheme.of(context)
  415. .bodyMedium
  416. .fontWeight,
  417. fontStyle: FlutterFlowTheme.of(context)
  418. .bodyMedium
  419. .fontStyle,
  420. ),
  421. ),
  422. ],
  423. ),
  424. Column(
  425. mainAxisSize: MainAxisSize.max,
  426. children: [
  427. Padding(
  428. padding: EdgeInsetsDirectional.fromSTEB(
  429. 16.0, 0.0, 16.0, 0.0),
  430. child: Text(
  431. FFLocalizations.of(context).getText(
  432. 'o7pt2vls' /* De gemeentes die je hebt gemar... */,
  433. ),
  434. style: FlutterFlowTheme.of(context)
  435. .bodyMedium
  436. .override(
  437. font: GoogleFonts.roboto(
  438. fontWeight:
  439. FlutterFlowTheme.of(context)
  440. .bodyMedium
  441. .fontWeight,
  442. fontStyle:
  443. FlutterFlowTheme.of(context)
  444. .bodyMedium
  445. .fontStyle,
  446. ),
  447. letterSpacing: 0.0,
  448. fontWeight: FlutterFlowTheme.of(context)
  449. .bodyMedium
  450. .fontWeight,
  451. fontStyle: FlutterFlowTheme.of(context)
  452. .bodyMedium
  453. .fontStyle,
  454. ),
  455. ),
  456. ),
  457. Expanded(
  458. child: Flex(
  459. direction: Axis.vertical,
  460. mainAxisSize: MainAxisSize.max,
  461. children: [
  462. Builder(
  463. builder: (context) {
  464. final favorieteGemeenteItem =
  465. _model.favorietenGemeenten.toList();
  466. _model.debugGeneratorVariables[
  467. 'favorieteGemeenteItem${favorieteGemeenteItem.length > 100 ? ' (first 100)' : ''}'] =
  468. debugSerializeParam(
  469. favorieteGemeenteItem.take(100),
  470. ParamType.JSON,
  471. isList: true,
  472. link:
  473. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  474. name: 'dynamic',
  475. nullable: false,
  476. );
  477. debugLogWidgetClass(_model);
  478. return ListView.builder(
  479. padding: EdgeInsets.zero,
  480. shrinkWrap: true,
  481. scrollDirection: Axis.vertical,
  482. itemCount:
  483. favorieteGemeenteItem.length,
  484. itemBuilder: (context,
  485. favorieteGemeenteItemIndex) {
  486. final favorieteGemeenteItemItem =
  487. favorieteGemeenteItem[
  488. favorieteGemeenteItemIndex];
  489. return InkWell(
  490. splashColor: Colors.transparent,
  491. focusColor: Colors.transparent,
  492. hoverColor: Colors.transparent,
  493. highlightColor:
  494. Colors.transparent,
  495. onTap: () async {
  496. FFAppState().gemeenteSelectId =
  497. getJsonField(
  498. favorieteGemeenteItemItem,
  499. r'''$.nid''',
  500. ).toString();
  501. FFAppState()
  502. .gemeenteSelectNaam =
  503. getJsonField(
  504. favorieteGemeenteItemItem,
  505. r'''$.titel''',
  506. ).toString();
  507. FFAppState().provincieSelectId =
  508. getJsonField(
  509. favorieteGemeenteItemItem,
  510. r'''$.parent_nid''',
  511. ).toString();
  512. FFAppState()
  513. .provincieSelectName =
  514. getJsonField(
  515. favorieteGemeenteItemItem,
  516. r'''$.parent_nid''',
  517. ).toString();
  518. safeSetState(() {});
  519. context.pushNamed(
  520. HomeWidget.routeName);
  521. },
  522. child: Material(
  523. color: Colors.transparent,
  524. child: ListTile(
  525. title: Text(
  526. getJsonField(
  527. favorieteGemeenteItemItem,
  528. r'''$.titel''',
  529. ).toString(),
  530. style: FlutterFlowTheme.of(
  531. context)
  532. .titleLarge
  533. .override(
  534. font: GoogleFonts
  535. .roboto(
  536. fontWeight:
  537. FlutterFlowTheme.of(
  538. context)
  539. .titleLarge
  540. .fontWeight,
  541. fontStyle:
  542. FlutterFlowTheme.of(
  543. context)
  544. .titleLarge
  545. .fontStyle,
  546. ),
  547. letterSpacing: 0.0,
  548. fontWeight:
  549. FlutterFlowTheme.of(
  550. context)
  551. .titleLarge
  552. .fontWeight,
  553. fontStyle:
  554. FlutterFlowTheme.of(
  555. context)
  556. .titleLarge
  557. .fontStyle,
  558. ),
  559. ),
  560. subtitle: Text(
  561. FFLocalizations.of(context)
  562. .getText(
  563. 'jm4s7cdn' /* Stel in als standaard */,
  564. ),
  565. style: FlutterFlowTheme.of(
  566. context)
  567. .labelMedium
  568. .override(
  569. font: GoogleFonts
  570. .roboto(
  571. fontWeight:
  572. FlutterFlowTheme.of(
  573. context)
  574. .labelMedium
  575. .fontWeight,
  576. fontStyle:
  577. FlutterFlowTheme.of(
  578. context)
  579. .labelMedium
  580. .fontStyle,
  581. ),
  582. letterSpacing: 0.0,
  583. fontWeight:
  584. FlutterFlowTheme.of(
  585. context)
  586. .labelMedium
  587. .fontWeight,
  588. fontStyle:
  589. FlutterFlowTheme.of(
  590. context)
  591. .labelMedium
  592. .fontStyle,
  593. ),
  594. ),
  595. trailing: Icon(
  596. Icons
  597. .arrow_forward_ios_rounded,
  598. color: FlutterFlowTheme.of(
  599. context)
  600. .secondaryText,
  601. size: 24.0,
  602. ),
  603. tileColor:
  604. FlutterFlowTheme.of(
  605. context)
  606. .secondaryBackground,
  607. dense: false,
  608. contentPadding:
  609. EdgeInsetsDirectional
  610. .fromSTEB(12.0, 0.0,
  611. 12.0, 0.0),
  612. shape: RoundedRectangleBorder(
  613. borderRadius:
  614. BorderRadius.circular(
  615. 8.0),
  616. ),
  617. ),
  618. ),
  619. );
  620. },
  621. );
  622. },
  623. ),
  624. ],
  625. ),
  626. ),
  627. ],
  628. ),
  629. Column(
  630. mainAxisSize: MainAxisSize.max,
  631. children: [
  632. Expanded(
  633. child: Builder(
  634. builder: (context) {
  635. final favorieteHorecagelegenheid = _model
  636. .favorieteHorecagelegenheden
  637. .toList();
  638. _model.debugGeneratorVariables[
  639. 'favorieteHorecagelegenheid${favorieteHorecagelegenheid.length > 100 ? ' (first 100)' : ''}'] =
  640. debugSerializeParam(
  641. favorieteHorecagelegenheid.take(100),
  642. ParamType.JSON,
  643. isList: true,
  644. link:
  645. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  646. name: 'dynamic',
  647. nullable: false,
  648. );
  649. debugLogWidgetClass(_model);
  650. return MasonryGridView.builder(
  651. gridDelegate:
  652. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  653. crossAxisCount: () {
  654. if (MediaQuery.sizeOf(context).width <
  655. kBreakpointSmall) {
  656. return 1;
  657. } else if (MediaQuery.sizeOf(context)
  658. .width <
  659. kBreakpointMedium) {
  660. return 1;
  661. } else if (MediaQuery.sizeOf(context)
  662. .width <
  663. kBreakpointLarge) {
  664. return 2;
  665. } else {
  666. return 3;
  667. }
  668. }(),
  669. ),
  670. crossAxisSpacing: 10.0,
  671. mainAxisSpacing: 10.0,
  672. itemCount:
  673. favorieteHorecagelegenheid.length,
  674. itemBuilder: (context,
  675. favorieteHorecagelegenheidIndex) {
  676. final favorieteHorecagelegenheidItem =
  677. favorieteHorecagelegenheid[
  678. favorieteHorecagelegenheidIndex];
  679. return InkWell(
  680. splashColor: Colors.transparent,
  681. focusColor: Colors.transparent,
  682. hoverColor: Colors.transparent,
  683. highlightColor: Colors.transparent,
  684. onTap: () async {
  685. context.pushNamed(
  686. HorecagelegenheidCurrentWidget
  687. .routeName,
  688. queryParameters: {
  689. 'nid': serializeParam(
  690. getJsonField(
  691. favorieteHorecagelegenheidItem,
  692. r'''$.nid''',
  693. ).toString(),
  694. ParamType.String,
  695. ),
  696. }.withoutNulls,
  697. );
  698. },
  699. child: Builder(builder: (_) {
  700. return DebugFlutterFlowModelContext(
  701. rootModel: _model.rootModel,
  702. parentModelCallback: (m) {
  703. _model.horecagelegenheidoverzichtKaartModels[
  704. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'] = m;
  705. },
  706. child:
  707. HorecagelegenheidoverzichtKaartWidget(
  708. key: Key(
  709. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'),
  710. titel: getJsonField(
  711. favorieteHorecagelegenheidItem,
  712. r'''$.titel''',
  713. ).toString(),
  714. logo: getJsonField(
  715. favorieteHorecagelegenheidItem,
  716. r'''$.logo''',
  717. ).toString(),
  718. nid: getJsonField(
  719. favorieteHorecagelegenheidItem,
  720. r'''$.nid''',
  721. ).toString(),
  722. adres: getJsonField(
  723. favorieteHorecagelegenheidItem,
  724. r'''$.adres''',
  725. ).toString(),
  726. plaats: getJsonField(
  727. favorieteHorecagelegenheidItem,
  728. r'''$.plaats''',
  729. ).toString(),
  730. categorie: (getJsonField(
  731. favorieteHorecagelegenheidItem,
  732. r'''$.categorie''',
  733. true,
  734. ) as List?)
  735. ?.map<String>(
  736. (e) => e.toString())
  737. .toList()
  738. .cast<String>(),
  739. ),
  740. );
  741. }),
  742. );
  743. },
  744. );
  745. },
  746. ),
  747. ),
  748. ],
  749. ),
  750. Column(
  751. mainAxisSize: MainAxisSize.max,
  752. children: [
  753. InkWell(
  754. splashColor: Colors.transparent,
  755. focusColor: Colors.transparent,
  756. hoverColor: Colors.transparent,
  757. highlightColor: Colors.transparent,
  758. onTap: () async {
  759. FFAppState().deleteUserToken();
  760. FFAppState().userToken = '';
  761. FFAppState().deleteUserSessionid();
  762. FFAppState().userSessionid = '';
  763. FFAppState().deleteUserSessionname();
  764. FFAppState().userSessionname = '';
  765. FFAppState().deleteUserName();
  766. FFAppState().userName = '';
  767. FFAppState().deleteUserUid();
  768. FFAppState().userUid = 0;
  769. FFAppState().deleteUserMail();
  770. FFAppState().userMail = '';
  771. safeSetState(() {});
  772. context.goNamed(LoginWidget.routeName);
  773. },
  774. child: Material(
  775. color: Colors.transparent,
  776. child: ListTile(
  777. title: Text(
  778. FFLocalizations.of(context).getText(
  779. '275gmehq' /* Uitloggen */,
  780. ),
  781. style: FlutterFlowTheme.of(context)
  782. .titleLarge
  783. .override(
  784. font: GoogleFonts.roboto(
  785. fontWeight:
  786. FlutterFlowTheme.of(context)
  787. .titleLarge
  788. .fontWeight,
  789. fontStyle:
  790. FlutterFlowTheme.of(context)
  791. .titleLarge
  792. .fontStyle,
  793. ),
  794. letterSpacing: 0.0,
  795. fontWeight:
  796. FlutterFlowTheme.of(context)
  797. .titleLarge
  798. .fontWeight,
  799. fontStyle:
  800. FlutterFlowTheme.of(context)
  801. .titleLarge
  802. .fontStyle,
  803. ),
  804. ),
  805. trailing: Icon(
  806. Icons.arrow_forward_ios_rounded,
  807. color: FlutterFlowTheme.of(context)
  808. .secondaryText,
  809. size: 24.0,
  810. ),
  811. tileColor: FlutterFlowTheme.of(context)
  812. .secondaryBackground,
  813. dense: false,
  814. contentPadding:
  815. EdgeInsetsDirectional.fromSTEB(
  816. 12.0, 0.0, 12.0, 0.0),
  817. shape: RoundedRectangleBorder(
  818. borderRadius: BorderRadius.circular(8.0),
  819. ),
  820. ),
  821. ),
  822. ),
  823. InkWell(
  824. splashColor: Colors.transparent,
  825. focusColor: Colors.transparent,
  826. hoverColor: Colors.transparent,
  827. highlightColor: Colors.transparent,
  828. onTap: () async {
  829. context
  830. .pushNamed(MijnProfielWidget.routeName);
  831. },
  832. child: Material(
  833. color: Colors.transparent,
  834. child: ListTile(
  835. title: Text(
  836. FFLocalizations.of(context).getText(
  837. 'pdzmzb1p' /* Mijn profiel */,
  838. ),
  839. style: FlutterFlowTheme.of(context)
  840. .titleLarge
  841. .override(
  842. font: GoogleFonts.roboto(
  843. fontWeight:
  844. FlutterFlowTheme.of(context)
  845. .titleLarge
  846. .fontWeight,
  847. fontStyle:
  848. FlutterFlowTheme.of(context)
  849. .titleLarge
  850. .fontStyle,
  851. ),
  852. letterSpacing: 0.0,
  853. fontWeight:
  854. FlutterFlowTheme.of(context)
  855. .titleLarge
  856. .fontWeight,
  857. fontStyle:
  858. FlutterFlowTheme.of(context)
  859. .titleLarge
  860. .fontStyle,
  861. ),
  862. ),
  863. trailing: Icon(
  864. Icons.arrow_forward_ios_rounded,
  865. color: FlutterFlowTheme.of(context)
  866. .secondaryText,
  867. size: 24.0,
  868. ),
  869. tileColor: FlutterFlowTheme.of(context)
  870. .secondaryBackground,
  871. dense: false,
  872. contentPadding:
  873. EdgeInsetsDirectional.fromSTEB(
  874. 12.0, 0.0, 12.0, 0.0),
  875. shape: RoundedRectangleBorder(
  876. borderRadius: BorderRadius.circular(8.0),
  877. ),
  878. ),
  879. ),
  880. ),
  881. InkWell(
  882. splashColor: Colors.transparent,
  883. focusColor: Colors.transparent,
  884. hoverColor: Colors.transparent,
  885. highlightColor: Colors.transparent,
  886. onTap: () async {
  887. context.pushNamed(
  888. WachtwoordVergetenWidget.routeName);
  889. },
  890. child: Material(
  891. color: Colors.transparent,
  892. child: ListTile(
  893. title: Text(
  894. FFLocalizations.of(context).getText(
  895. 'ogz7q3xk' /* Wachtwoord wijzigen */,
  896. ),
  897. style: FlutterFlowTheme.of(context)
  898. .titleLarge
  899. .override(
  900. font: GoogleFonts.roboto(
  901. fontWeight:
  902. FlutterFlowTheme.of(context)
  903. .titleLarge
  904. .fontWeight,
  905. fontStyle:
  906. FlutterFlowTheme.of(context)
  907. .titleLarge
  908. .fontStyle,
  909. ),
  910. letterSpacing: 0.0,
  911. fontWeight:
  912. FlutterFlowTheme.of(context)
  913. .titleLarge
  914. .fontWeight,
  915. fontStyle:
  916. FlutterFlowTheme.of(context)
  917. .titleLarge
  918. .fontStyle,
  919. ),
  920. ),
  921. trailing: Icon(
  922. Icons.arrow_forward_ios_rounded,
  923. color: FlutterFlowTheme.of(context)
  924. .secondaryText,
  925. size: 24.0,
  926. ),
  927. tileColor: FlutterFlowTheme.of(context)
  928. .secondaryBackground,
  929. dense: false,
  930. contentPadding:
  931. EdgeInsetsDirectional.fromSTEB(
  932. 12.0, 0.0, 12.0, 0.0),
  933. shape: RoundedRectangleBorder(
  934. borderRadius: BorderRadius.circular(8.0),
  935. ),
  936. ),
  937. ),
  938. ),
  939. InkWell(
  940. splashColor: Colors.transparent,
  941. focusColor: Colors.transparent,
  942. hoverColor: Colors.transparent,
  943. highlightColor: Colors.transparent,
  944. onTap: () async {
  945. unawaited(
  946. () async {
  947. await launchURL(
  948. 'https://uitgaanskrant.com/nl/account-verwijderen');
  949. }(),
  950. );
  951. },
  952. child: Material(
  953. color: Colors.transparent,
  954. child: ListTile(
  955. title: Text(
  956. FFLocalizations.of(context).getText(
  957. 'i31b4itp' /* Account verwijderen */,
  958. ),
  959. style: FlutterFlowTheme.of(context)
  960. .titleLarge
  961. .override(
  962. font: GoogleFonts.roboto(
  963. fontWeight:
  964. FlutterFlowTheme.of(context)
  965. .titleLarge
  966. .fontWeight,
  967. fontStyle:
  968. FlutterFlowTheme.of(context)
  969. .titleLarge
  970. .fontStyle,
  971. ),
  972. letterSpacing: 0.0,
  973. fontWeight:
  974. FlutterFlowTheme.of(context)
  975. .titleLarge
  976. .fontWeight,
  977. fontStyle:
  978. FlutterFlowTheme.of(context)
  979. .titleLarge
  980. .fontStyle,
  981. ),
  982. ),
  983. trailing: Icon(
  984. Icons.arrow_forward_ios_rounded,
  985. color: FlutterFlowTheme.of(context)
  986. .secondaryText,
  987. size: 24.0,
  988. ),
  989. tileColor: FlutterFlowTheme.of(context)
  990. .secondaryBackground,
  991. dense: false,
  992. contentPadding:
  993. EdgeInsetsDirectional.fromSTEB(
  994. 12.0, 0.0, 12.0, 0.0),
  995. shape: RoundedRectangleBorder(
  996. borderRadius: BorderRadius.circular(8.0),
  997. ),
  998. ),
  999. ),
  1000. ),
  1001. FFButtonWidget(
  1002. onPressed: () async {
  1003. context.pushNamed(
  1004. StadsactiviteitAanmakenWidget.routeName);
  1005. },
  1006. text: FFLocalizations.of(context).getText(
  1007. 'fbl4ak2y' /* stadsactiviteit aanmaken */,
  1008. ),
  1009. options: FFButtonOptions(
  1010. height: 40.0,
  1011. padding: EdgeInsetsDirectional.fromSTEB(
  1012. 16.0, 0.0, 16.0, 0.0),
  1013. iconPadding: EdgeInsetsDirectional.fromSTEB(
  1014. 0.0, 0.0, 0.0, 0.0),
  1015. color: FlutterFlowTheme.of(context).primary,
  1016. textStyle: FlutterFlowTheme.of(context)
  1017. .titleSmall
  1018. .override(
  1019. font: GoogleFonts.roboto(
  1020. fontWeight:
  1021. FlutterFlowTheme.of(context)
  1022. .titleSmall
  1023. .fontWeight,
  1024. fontStyle:
  1025. FlutterFlowTheme.of(context)
  1026. .titleSmall
  1027. .fontStyle,
  1028. ),
  1029. color: Colors.white,
  1030. letterSpacing: 0.0,
  1031. fontWeight: FlutterFlowTheme.of(context)
  1032. .titleSmall
  1033. .fontWeight,
  1034. fontStyle: FlutterFlowTheme.of(context)
  1035. .titleSmall
  1036. .fontStyle,
  1037. ),
  1038. elevation: 0.0,
  1039. borderRadius: BorderRadius.circular(8.0),
  1040. ),
  1041. ),
  1042. Text(
  1043. valueOrDefault<String>(
  1044. functions.buildStempel(),
  1045. 'buildStempel',
  1046. ),
  1047. style: FlutterFlowTheme.of(context)
  1048. .bodyMedium
  1049. .override(
  1050. font: GoogleFonts.roboto(
  1051. fontWeight: FlutterFlowTheme.of(context)
  1052. .bodyMedium
  1053. .fontWeight,
  1054. fontStyle: FlutterFlowTheme.of(context)
  1055. .bodyMedium
  1056. .fontStyle,
  1057. ),
  1058. letterSpacing: 0.0,
  1059. fontWeight: FlutterFlowTheme.of(context)
  1060. .bodyMedium
  1061. .fontWeight,
  1062. fontStyle: FlutterFlowTheme.of(context)
  1063. .bodyMedium
  1064. .fontStyle,
  1065. ),
  1066. ),
  1067. ],
  1068. ),
  1069. ],
  1070. ),
  1071. ),
  1072. ],
  1073. ),
  1074. ),
  1075. ],
  1076. ),
  1077. ),
  1078. ),
  1079. );
  1080. }
  1081. }