favorieten_widget.dart 73 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306
  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).primaryText,
  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. 'y9b1k3hk' /* 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. Padding(
  298. padding: EdgeInsetsDirectional.fromSTEB(
  299. 16.0, 0.0, 16.0, 8.0),
  300. child: Text(
  301. FFLocalizations.of(context).getText(
  302. '48axn1wj' /* * op basis van favoriete horec... */,
  303. ),
  304. style: FlutterFlowTheme.of(context)
  305. .bodySmall
  306. .override(
  307. font: GoogleFonts.roboto(
  308. fontWeight:
  309. FlutterFlowTheme.of(context)
  310. .bodySmall
  311. .fontWeight,
  312. fontStyle:
  313. FlutterFlowTheme.of(context)
  314. .bodySmall
  315. .fontStyle,
  316. ),
  317. color: FlutterFlowTheme.of(context)
  318. .secondaryText,
  319. letterSpacing: 0.0,
  320. fontWeight: FlutterFlowTheme.of(context)
  321. .bodySmall
  322. .fontWeight,
  323. fontStyle: FlutterFlowTheme.of(context)
  324. .bodySmall
  325. .fontStyle,
  326. ),
  327. ),
  328. ),
  329. Expanded(
  330. child: Builder(
  331. builder: (context) {
  332. final favorietenAgendaItems =
  333. _model.favorietenAgenda.toList();
  334. _model.debugGeneratorVariables[
  335. 'favorietenAgendaItems${favorietenAgendaItems.length > 100 ? ' (first 100)' : ''}'] =
  336. debugSerializeParam(
  337. favorietenAgendaItems.take(100),
  338. ParamType.JSON,
  339. isList: true,
  340. link:
  341. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  342. name: 'dynamic',
  343. nullable: false,
  344. );
  345. debugLogWidgetClass(_model);
  346. return MasonryGridView.builder(
  347. gridDelegate:
  348. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  349. crossAxisCount: () {
  350. if (MediaQuery.sizeOf(context).width <
  351. kBreakpointSmall) {
  352. return 1;
  353. } else if (MediaQuery.sizeOf(context)
  354. .width <
  355. kBreakpointMedium) {
  356. return 1;
  357. } else if (MediaQuery.sizeOf(context)
  358. .width <
  359. kBreakpointLarge) {
  360. return 2;
  361. } else {
  362. return 3;
  363. }
  364. }(),
  365. ),
  366. crossAxisSpacing: 10.0,
  367. mainAxisSpacing: 10.0,
  368. itemCount: favorietenAgendaItems.length,
  369. itemBuilder: (context,
  370. favorietenAgendaItemsIndex) {
  371. final favorietenAgendaItemsItem =
  372. favorietenAgendaItems[
  373. favorietenAgendaItemsIndex];
  374. return Builder(builder: (_) {
  375. return DebugFlutterFlowModelContext(
  376. rootModel: _model.rootModel,
  377. parentModelCallback: (m) {
  378. _model.uitgaantabelKaartModels[
  379. 'Keyiv6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'] = m;
  380. },
  381. child: UitgaantabelKaartWidget(
  382. key: Key(
  383. 'Keyiv6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'),
  384. logo: getJsonField(
  385. favorietenAgendaItemsItem,
  386. r'''$.logo''',
  387. ),
  388. categorie: getJsonField(
  389. favorietenAgendaItemsItem,
  390. r'''$.categorie''',
  391. ),
  392. titel: getJsonField(
  393. favorietenAgendaItemsItem,
  394. r'''$.titel''',
  395. ),
  396. horecagelegenheid: getJsonField(
  397. favorietenAgendaItemsItem,
  398. r'''$.horecagelegenheid''',
  399. ),
  400. adres: getJsonField(
  401. favorietenAgendaItemsItem,
  402. r'''$.adres''',
  403. ),
  404. plaats: getJsonField(
  405. favorietenAgendaItemsItem,
  406. r'''$.plaats''',
  407. ),
  408. datum: getJsonField(
  409. favorietenAgendaItemsItem,
  410. r'''$.datum''',
  411. ),
  412. inhoud: null,
  413. nid: getJsonField(
  414. favorietenAgendaItemsItem,
  415. r'''$.nid''',
  416. ),
  417. horecagelegenheidNid:
  418. getJsonField(
  419. favorietenAgendaItemsItem,
  420. r'''$.horecagelegenheidNid''',
  421. ),
  422. ),
  423. );
  424. });
  425. },
  426. );
  427. },
  428. ),
  429. ),
  430. ],
  431. ),
  432. Column(
  433. mainAxisSize: MainAxisSize.max,
  434. children: [
  435. Padding(
  436. padding: EdgeInsetsDirectional.fromSTEB(
  437. 16.0, 0.0, 16.0, 0.0),
  438. child: Text(
  439. FFLocalizations.of(context).getText(
  440. 'o7pt2vls' /* De gemeentes die je hebt gemar... */,
  441. ),
  442. style: FlutterFlowTheme.of(context)
  443. .bodyMedium
  444. .override(
  445. font: GoogleFonts.roboto(
  446. fontWeight:
  447. FlutterFlowTheme.of(context)
  448. .bodyMedium
  449. .fontWeight,
  450. fontStyle:
  451. FlutterFlowTheme.of(context)
  452. .bodyMedium
  453. .fontStyle,
  454. ),
  455. letterSpacing: 0.0,
  456. fontWeight: FlutterFlowTheme.of(context)
  457. .bodyMedium
  458. .fontWeight,
  459. fontStyle: FlutterFlowTheme.of(context)
  460. .bodyMedium
  461. .fontStyle,
  462. ),
  463. ),
  464. ),
  465. Expanded(
  466. child: Flex(
  467. direction: Axis.vertical,
  468. mainAxisSize: MainAxisSize.max,
  469. children: [
  470. Builder(
  471. builder: (context) {
  472. final favorieteGemeenteItem =
  473. _model.favorietenGemeenten.toList();
  474. _model.debugGeneratorVariables[
  475. 'favorieteGemeenteItem${favorieteGemeenteItem.length > 100 ? ' (first 100)' : ''}'] =
  476. debugSerializeParam(
  477. favorieteGemeenteItem.take(100),
  478. ParamType.JSON,
  479. isList: true,
  480. link:
  481. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  482. name: 'dynamic',
  483. nullable: false,
  484. );
  485. debugLogWidgetClass(_model);
  486. return ListView.builder(
  487. padding: EdgeInsets.zero,
  488. shrinkWrap: true,
  489. scrollDirection: Axis.vertical,
  490. itemCount:
  491. favorieteGemeenteItem.length,
  492. itemBuilder: (context,
  493. favorieteGemeenteItemIndex) {
  494. final favorieteGemeenteItemItem =
  495. favorieteGemeenteItem[
  496. favorieteGemeenteItemIndex];
  497. return InkWell(
  498. splashColor: Colors.transparent,
  499. focusColor: Colors.transparent,
  500. hoverColor: Colors.transparent,
  501. highlightColor:
  502. Colors.transparent,
  503. onTap: () async {
  504. FFAppState().gemeenteSelectId =
  505. getJsonField(
  506. favorieteGemeenteItemItem,
  507. r'''$.nid''',
  508. ).toString();
  509. FFAppState()
  510. .gemeenteSelectNaam =
  511. getJsonField(
  512. favorieteGemeenteItemItem,
  513. r'''$.titel''',
  514. ).toString();
  515. FFAppState().provincieSelectId =
  516. getJsonField(
  517. favorieteGemeenteItemItem,
  518. r'''$.parent_nid''',
  519. ).toString();
  520. FFAppState()
  521. .provincieSelectName =
  522. getJsonField(
  523. favorieteGemeenteItemItem,
  524. r'''$.parent_nid''',
  525. ).toString();
  526. safeSetState(() {});
  527. context.pushNamed(
  528. HomeWidget.routeName);
  529. },
  530. child: Material(
  531. color: Colors.transparent,
  532. child: ListTile(
  533. title: Text(
  534. getJsonField(
  535. favorieteGemeenteItemItem,
  536. r'''$.titel''',
  537. ).toString(),
  538. style: FlutterFlowTheme.of(
  539. context)
  540. .titleLarge
  541. .override(
  542. font: GoogleFonts
  543. .roboto(
  544. fontWeight:
  545. FlutterFlowTheme.of(
  546. context)
  547. .titleLarge
  548. .fontWeight,
  549. fontStyle:
  550. FlutterFlowTheme.of(
  551. context)
  552. .titleLarge
  553. .fontStyle,
  554. ),
  555. letterSpacing: 0.0,
  556. fontWeight:
  557. FlutterFlowTheme.of(
  558. context)
  559. .titleLarge
  560. .fontWeight,
  561. fontStyle:
  562. FlutterFlowTheme.of(
  563. context)
  564. .titleLarge
  565. .fontStyle,
  566. ),
  567. ),
  568. subtitle: Text(
  569. FFLocalizations.of(context)
  570. .getText(
  571. 'jm4s7cdn' /* Stel in als standaard */,
  572. ),
  573. style: FlutterFlowTheme.of(
  574. context)
  575. .labelMedium
  576. .override(
  577. font: GoogleFonts
  578. .roboto(
  579. fontWeight:
  580. FlutterFlowTheme.of(
  581. context)
  582. .labelMedium
  583. .fontWeight,
  584. fontStyle:
  585. FlutterFlowTheme.of(
  586. context)
  587. .labelMedium
  588. .fontStyle,
  589. ),
  590. letterSpacing: 0.0,
  591. fontWeight:
  592. FlutterFlowTheme.of(
  593. context)
  594. .labelMedium
  595. .fontWeight,
  596. fontStyle:
  597. FlutterFlowTheme.of(
  598. context)
  599. .labelMedium
  600. .fontStyle,
  601. ),
  602. ),
  603. trailing: Icon(
  604. Icons
  605. .arrow_forward_ios_rounded,
  606. color: FlutterFlowTheme.of(
  607. context)
  608. .secondaryText,
  609. size: 24.0,
  610. ),
  611. tileColor:
  612. FlutterFlowTheme.of(
  613. context)
  614. .secondaryBackground,
  615. dense: false,
  616. contentPadding:
  617. EdgeInsetsDirectional
  618. .fromSTEB(12.0, 0.0,
  619. 12.0, 0.0),
  620. shape: RoundedRectangleBorder(
  621. borderRadius:
  622. BorderRadius.circular(
  623. 8.0),
  624. ),
  625. ),
  626. ),
  627. );
  628. },
  629. );
  630. },
  631. ),
  632. ],
  633. ),
  634. ),
  635. ],
  636. ),
  637. Column(
  638. mainAxisSize: MainAxisSize.max,
  639. children: [
  640. Expanded(
  641. child: Builder(
  642. builder: (context) {
  643. final favorieteHorecagelegenheid = _model
  644. .favorieteHorecagelegenheden
  645. .toList();
  646. _model.debugGeneratorVariables[
  647. 'favorieteHorecagelegenheid${favorieteHorecagelegenheid.length > 100 ? ' (first 100)' : ''}'] =
  648. debugSerializeParam(
  649. favorieteHorecagelegenheid.take(100),
  650. ParamType.JSON,
  651. isList: true,
  652. link:
  653. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  654. name: 'dynamic',
  655. nullable: false,
  656. );
  657. debugLogWidgetClass(_model);
  658. return MasonryGridView.builder(
  659. gridDelegate:
  660. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  661. crossAxisCount: () {
  662. if (MediaQuery.sizeOf(context).width <
  663. kBreakpointSmall) {
  664. return 1;
  665. } else if (MediaQuery.sizeOf(context)
  666. .width <
  667. kBreakpointMedium) {
  668. return 1;
  669. } else if (MediaQuery.sizeOf(context)
  670. .width <
  671. kBreakpointLarge) {
  672. return 2;
  673. } else {
  674. return 3;
  675. }
  676. }(),
  677. ),
  678. crossAxisSpacing: 10.0,
  679. mainAxisSpacing: 10.0,
  680. itemCount:
  681. favorieteHorecagelegenheid.length,
  682. itemBuilder: (context,
  683. favorieteHorecagelegenheidIndex) {
  684. final favorieteHorecagelegenheidItem =
  685. favorieteHorecagelegenheid[
  686. favorieteHorecagelegenheidIndex];
  687. return InkWell(
  688. splashColor: Colors.transparent,
  689. focusColor: Colors.transparent,
  690. hoverColor: Colors.transparent,
  691. highlightColor: Colors.transparent,
  692. onTap: () async {
  693. context.pushNamed(
  694. HorecagelegenheidCurrentWidget
  695. .routeName,
  696. queryParameters: {
  697. 'nid': serializeParam(
  698. getJsonField(
  699. favorieteHorecagelegenheidItem,
  700. r'''$.nid''',
  701. ).toString(),
  702. ParamType.String,
  703. ),
  704. }.withoutNulls,
  705. );
  706. },
  707. child: Builder(builder: (_) {
  708. return DebugFlutterFlowModelContext(
  709. rootModel: _model.rootModel,
  710. parentModelCallback: (m) {
  711. _model.horecagelegenheidoverzichtKaartModels[
  712. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'] = m;
  713. },
  714. child:
  715. HorecagelegenheidoverzichtKaartWidget(
  716. key: Key(
  717. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'),
  718. titel: getJsonField(
  719. favorieteHorecagelegenheidItem,
  720. r'''$.titel''',
  721. ).toString(),
  722. logo: getJsonField(
  723. favorieteHorecagelegenheidItem,
  724. r'''$.logo''',
  725. ).toString(),
  726. nid: getJsonField(
  727. favorieteHorecagelegenheidItem,
  728. r'''$.nid''',
  729. ).toString(),
  730. adres: getJsonField(
  731. favorieteHorecagelegenheidItem,
  732. r'''$.adres''',
  733. ).toString(),
  734. plaats: getJsonField(
  735. favorieteHorecagelegenheidItem,
  736. r'''$.plaats''',
  737. ).toString(),
  738. categorie: (getJsonField(
  739. favorieteHorecagelegenheidItem,
  740. r'''$.categorie''',
  741. true,
  742. ) as List?)
  743. ?.map<String>(
  744. (e) => e.toString())
  745. .toList()
  746. .cast<String>(),
  747. ),
  748. );
  749. }),
  750. );
  751. },
  752. );
  753. },
  754. ),
  755. ),
  756. ],
  757. ),
  758. Column(
  759. mainAxisSize: MainAxisSize.max,
  760. children: [
  761. if (FFAppState().userSessionid != null &&
  762. FFAppState().userSessionid != '')
  763. Column(
  764. mainAxisSize: MainAxisSize.max,
  765. children: [
  766. InkWell(
  767. splashColor: Colors.transparent,
  768. focusColor: Colors.transparent,
  769. hoverColor: Colors.transparent,
  770. highlightColor: Colors.transparent,
  771. onTap: () async {
  772. FFAppState().deleteUserToken();
  773. FFAppState().userToken = '';
  774. FFAppState().deleteUserSessionid();
  775. FFAppState().userSessionid = '';
  776. FFAppState().deleteUserSessionname();
  777. FFAppState().userSessionname = '';
  778. FFAppState().deleteUserName();
  779. FFAppState().userName = '';
  780. FFAppState().deleteUserUid();
  781. FFAppState().userUid = 0;
  782. FFAppState().deleteUserMail();
  783. FFAppState().userMail = '';
  784. safeSetState(() {});
  785. context.goNamed(LoginWidget.routeName);
  786. },
  787. child: Material(
  788. color: Colors.transparent,
  789. child: ListTile(
  790. title: Text(
  791. FFLocalizations.of(context).getText(
  792. 'wl9hk4vl' /* Uitloggen */,
  793. ),
  794. style: FlutterFlowTheme.of(context)
  795. .titleLarge
  796. .override(
  797. font: GoogleFonts.roboto(
  798. fontWeight:
  799. FlutterFlowTheme.of(
  800. context)
  801. .titleLarge
  802. .fontWeight,
  803. fontStyle:
  804. FlutterFlowTheme.of(
  805. context)
  806. .titleLarge
  807. .fontStyle,
  808. ),
  809. letterSpacing: 0.0,
  810. fontWeight:
  811. FlutterFlowTheme.of(
  812. context)
  813. .titleLarge
  814. .fontWeight,
  815. fontStyle:
  816. FlutterFlowTheme.of(
  817. context)
  818. .titleLarge
  819. .fontStyle,
  820. ),
  821. ),
  822. trailing: Icon(
  823. Icons.arrow_forward_ios_rounded,
  824. color: FlutterFlowTheme.of(context)
  825. .secondaryText,
  826. size: 24.0,
  827. ),
  828. tileColor:
  829. FlutterFlowTheme.of(context)
  830. .secondaryBackground,
  831. dense: false,
  832. contentPadding:
  833. EdgeInsetsDirectional.fromSTEB(
  834. 12.0, 0.0, 12.0, 0.0),
  835. shape: RoundedRectangleBorder(
  836. borderRadius:
  837. BorderRadius.circular(8.0),
  838. ),
  839. ),
  840. ),
  841. ),
  842. InkWell(
  843. splashColor: Colors.transparent,
  844. focusColor: Colors.transparent,
  845. hoverColor: Colors.transparent,
  846. highlightColor: Colors.transparent,
  847. onTap: () async {
  848. context.pushNamed(
  849. MijnProfielWidget.routeName);
  850. },
  851. child: Material(
  852. color: Colors.transparent,
  853. child: ListTile(
  854. title: Text(
  855. FFLocalizations.of(context).getText(
  856. 'mj6x0sxf' /* Mijn profiel */,
  857. ),
  858. style: FlutterFlowTheme.of(context)
  859. .titleLarge
  860. .override(
  861. font: GoogleFonts.roboto(
  862. fontWeight:
  863. FlutterFlowTheme.of(
  864. context)
  865. .titleLarge
  866. .fontWeight,
  867. fontStyle:
  868. FlutterFlowTheme.of(
  869. context)
  870. .titleLarge
  871. .fontStyle,
  872. ),
  873. letterSpacing: 0.0,
  874. fontWeight:
  875. FlutterFlowTheme.of(
  876. context)
  877. .titleLarge
  878. .fontWeight,
  879. fontStyle:
  880. FlutterFlowTheme.of(
  881. context)
  882. .titleLarge
  883. .fontStyle,
  884. ),
  885. ),
  886. trailing: Icon(
  887. Icons.arrow_forward_ios_rounded,
  888. color: FlutterFlowTheme.of(context)
  889. .secondaryText,
  890. size: 24.0,
  891. ),
  892. tileColor:
  893. FlutterFlowTheme.of(context)
  894. .secondaryBackground,
  895. dense: false,
  896. contentPadding:
  897. EdgeInsetsDirectional.fromSTEB(
  898. 12.0, 0.0, 12.0, 0.0),
  899. shape: RoundedRectangleBorder(
  900. borderRadius:
  901. BorderRadius.circular(8.0),
  902. ),
  903. ),
  904. ),
  905. ),
  906. InkWell(
  907. splashColor: Colors.transparent,
  908. focusColor: Colors.transparent,
  909. hoverColor: Colors.transparent,
  910. highlightColor: Colors.transparent,
  911. onTap: () async {
  912. context.pushNamed(
  913. WachtwoordVergetenWidget.routeName);
  914. },
  915. child: Material(
  916. color: Colors.transparent,
  917. child: ListTile(
  918. title: Text(
  919. FFLocalizations.of(context).getText(
  920. 'wxlmmqen' /* Wachtwoord wijzigen */,
  921. ),
  922. style: FlutterFlowTheme.of(context)
  923. .titleLarge
  924. .override(
  925. font: GoogleFonts.roboto(
  926. fontWeight:
  927. FlutterFlowTheme.of(
  928. context)
  929. .titleLarge
  930. .fontWeight,
  931. fontStyle:
  932. FlutterFlowTheme.of(
  933. context)
  934. .titleLarge
  935. .fontStyle,
  936. ),
  937. letterSpacing: 0.0,
  938. fontWeight:
  939. FlutterFlowTheme.of(
  940. context)
  941. .titleLarge
  942. .fontWeight,
  943. fontStyle:
  944. FlutterFlowTheme.of(
  945. context)
  946. .titleLarge
  947. .fontStyle,
  948. ),
  949. ),
  950. trailing: Icon(
  951. Icons.arrow_forward_ios_rounded,
  952. color: FlutterFlowTheme.of(context)
  953. .secondaryText,
  954. size: 24.0,
  955. ),
  956. tileColor:
  957. FlutterFlowTheme.of(context)
  958. .secondaryBackground,
  959. dense: false,
  960. contentPadding:
  961. EdgeInsetsDirectional.fromSTEB(
  962. 12.0, 0.0, 12.0, 0.0),
  963. shape: RoundedRectangleBorder(
  964. borderRadius:
  965. BorderRadius.circular(8.0),
  966. ),
  967. ),
  968. ),
  969. ),
  970. InkWell(
  971. splashColor: Colors.transparent,
  972. focusColor: Colors.transparent,
  973. hoverColor: Colors.transparent,
  974. highlightColor: Colors.transparent,
  975. onTap: () async {
  976. unawaited(
  977. () async {
  978. await launchURL(
  979. 'https://uitgaanskrant.com/nl/support/mobieleapp');
  980. }(),
  981. );
  982. },
  983. child: Material(
  984. color: Colors.transparent,
  985. child: ListTile(
  986. title: Text(
  987. FFLocalizations.of(context).getText(
  988. 'lwnfr9gv' /* Account verwijderen */,
  989. ),
  990. style: FlutterFlowTheme.of(context)
  991. .titleLarge
  992. .override(
  993. font: GoogleFonts.roboto(
  994. fontWeight:
  995. FlutterFlowTheme.of(
  996. context)
  997. .titleLarge
  998. .fontWeight,
  999. fontStyle:
  1000. FlutterFlowTheme.of(
  1001. context)
  1002. .titleLarge
  1003. .fontStyle,
  1004. ),
  1005. letterSpacing: 0.0,
  1006. fontWeight:
  1007. FlutterFlowTheme.of(
  1008. context)
  1009. .titleLarge
  1010. .fontWeight,
  1011. fontStyle:
  1012. FlutterFlowTheme.of(
  1013. context)
  1014. .titleLarge
  1015. .fontStyle,
  1016. ),
  1017. ),
  1018. trailing: Icon(
  1019. Icons.arrow_forward_ios_rounded,
  1020. color: FlutterFlowTheme.of(context)
  1021. .secondaryText,
  1022. size: 24.0,
  1023. ),
  1024. tileColor:
  1025. FlutterFlowTheme.of(context)
  1026. .secondaryBackground,
  1027. dense: false,
  1028. contentPadding:
  1029. EdgeInsetsDirectional.fromSTEB(
  1030. 12.0, 0.0, 12.0, 0.0),
  1031. shape: RoundedRectangleBorder(
  1032. borderRadius:
  1033. BorderRadius.circular(8.0),
  1034. ),
  1035. ),
  1036. ),
  1037. ),
  1038. FFButtonWidget(
  1039. onPressed: () async {
  1040. context.pushNamed(
  1041. StadsactiviteitAanmakenWidget
  1042. .routeName);
  1043. },
  1044. text: FFLocalizations.of(context).getText(
  1045. 'xglkp3tc' /* Stadsactiviteit aanmaken */,
  1046. ),
  1047. options: FFButtonOptions(
  1048. height: 40.0,
  1049. padding: EdgeInsetsDirectional.fromSTEB(
  1050. 16.0, 0.0, 16.0, 0.0),
  1051. iconPadding:
  1052. EdgeInsetsDirectional.fromSTEB(
  1053. 0.0, 0.0, 0.0, 0.0),
  1054. color: FlutterFlowTheme.of(context)
  1055. .secondary,
  1056. textStyle: FlutterFlowTheme.of(context)
  1057. .titleSmall
  1058. .override(
  1059. font: GoogleFonts.roboto(
  1060. fontWeight:
  1061. FlutterFlowTheme.of(context)
  1062. .titleSmall
  1063. .fontWeight,
  1064. fontStyle:
  1065. FlutterFlowTheme.of(context)
  1066. .titleSmall
  1067. .fontStyle,
  1068. ),
  1069. color: Colors.white,
  1070. letterSpacing: 0.0,
  1071. fontWeight:
  1072. FlutterFlowTheme.of(context)
  1073. .titleSmall
  1074. .fontWeight,
  1075. fontStyle:
  1076. FlutterFlowTheme.of(context)
  1077. .titleSmall
  1078. .fontStyle,
  1079. ),
  1080. elevation: 0.0,
  1081. borderRadius:
  1082. BorderRadius.circular(8.0),
  1083. ),
  1084. ),
  1085. Text(
  1086. valueOrDefault<String>(
  1087. functions.buildStempel(),
  1088. 'buildStempel',
  1089. ),
  1090. style: FlutterFlowTheme.of(context)
  1091. .bodyMedium
  1092. .override(
  1093. font: GoogleFonts.roboto(
  1094. fontWeight:
  1095. FlutterFlowTheme.of(context)
  1096. .bodyMedium
  1097. .fontWeight,
  1098. fontStyle:
  1099. FlutterFlowTheme.of(context)
  1100. .bodyMedium
  1101. .fontStyle,
  1102. ),
  1103. letterSpacing: 0.0,
  1104. fontWeight:
  1105. FlutterFlowTheme.of(context)
  1106. .bodyMedium
  1107. .fontWeight,
  1108. fontStyle:
  1109. FlutterFlowTheme.of(context)
  1110. .bodyMedium
  1111. .fontStyle,
  1112. ),
  1113. ),
  1114. ],
  1115. ),
  1116. if (FFAppState().userSessionid == null ||
  1117. FFAppState().userSessionid == '')
  1118. Padding(
  1119. padding: EdgeInsetsDirectional.fromSTEB(
  1120. 16.0, 0.0, 16.0, 0.0),
  1121. child: Column(
  1122. mainAxisSize: MainAxisSize.max,
  1123. children: [
  1124. Text(
  1125. FFLocalizations.of(context).getText(
  1126. 'zxbjvxzq' /* Met een account bewaar je favo... */,
  1127. ),
  1128. style: FlutterFlowTheme.of(context)
  1129. .bodyMedium
  1130. .override(
  1131. font: GoogleFonts.roboto(
  1132. fontWeight:
  1133. FlutterFlowTheme.of(context)
  1134. .bodyMedium
  1135. .fontWeight,
  1136. fontStyle:
  1137. FlutterFlowTheme.of(context)
  1138. .bodyMedium
  1139. .fontStyle,
  1140. ),
  1141. letterSpacing: 0.0,
  1142. fontWeight:
  1143. FlutterFlowTheme.of(context)
  1144. .bodyMedium
  1145. .fontWeight,
  1146. fontStyle:
  1147. FlutterFlowTheme.of(context)
  1148. .bodyMedium
  1149. .fontStyle,
  1150. ),
  1151. ),
  1152. FFButtonWidget(
  1153. onPressed: () async {
  1154. await launchURL(
  1155. 'https://uitgaanskrant.com/nl/user/register');
  1156. },
  1157. text:
  1158. FFLocalizations.of(context).getText(
  1159. '1xim8yie' /* Account aanmaken */,
  1160. ),
  1161. options: FFButtonOptions(
  1162. height: 40.0,
  1163. padding:
  1164. EdgeInsetsDirectional.fromSTEB(
  1165. 16.0, 0.0, 16.0, 0.0),
  1166. iconPadding:
  1167. EdgeInsetsDirectional.fromSTEB(
  1168. 0.0, 0.0, 0.0, 0.0),
  1169. color: FlutterFlowTheme.of(context)
  1170. .secondary,
  1171. textStyle: FlutterFlowTheme.of(
  1172. context)
  1173. .titleSmall
  1174. .override(
  1175. font: GoogleFonts.roboto(
  1176. fontWeight:
  1177. FlutterFlowTheme.of(
  1178. context)
  1179. .titleSmall
  1180. .fontWeight,
  1181. fontStyle:
  1182. FlutterFlowTheme.of(
  1183. context)
  1184. .titleSmall
  1185. .fontStyle,
  1186. ),
  1187. color: Colors.white,
  1188. letterSpacing: 0.0,
  1189. fontWeight:
  1190. FlutterFlowTheme.of(context)
  1191. .titleSmall
  1192. .fontWeight,
  1193. fontStyle:
  1194. FlutterFlowTheme.of(context)
  1195. .titleSmall
  1196. .fontStyle,
  1197. ),
  1198. elevation: 0.0,
  1199. borderRadius:
  1200. BorderRadius.circular(8.0),
  1201. ),
  1202. ),
  1203. FFButtonWidget(
  1204. onPressed: () async {
  1205. context
  1206. .pushNamed(LoginWidget.routeName);
  1207. },
  1208. text:
  1209. FFLocalizations.of(context).getText(
  1210. 'svydwydi' /* Inloggen */,
  1211. ),
  1212. options: FFButtonOptions(
  1213. height: 40.0,
  1214. padding:
  1215. EdgeInsetsDirectional.fromSTEB(
  1216. 16.0, 0.0, 16.0, 0.0),
  1217. iconPadding:
  1218. EdgeInsetsDirectional.fromSTEB(
  1219. 0.0, 0.0, 0.0, 0.0),
  1220. color: FlutterFlowTheme.of(context)
  1221. .primaryBackground,
  1222. textStyle: FlutterFlowTheme.of(
  1223. context)
  1224. .titleSmall
  1225. .override(
  1226. font: GoogleFonts.roboto(
  1227. fontWeight:
  1228. FlutterFlowTheme.of(
  1229. context)
  1230. .titleSmall
  1231. .fontWeight,
  1232. fontStyle:
  1233. FlutterFlowTheme.of(
  1234. context)
  1235. .titleSmall
  1236. .fontStyle,
  1237. ),
  1238. color:
  1239. FlutterFlowTheme.of(context)
  1240. .secondary,
  1241. letterSpacing: 0.0,
  1242. fontWeight:
  1243. FlutterFlowTheme.of(context)
  1244. .titleSmall
  1245. .fontWeight,
  1246. fontStyle:
  1247. FlutterFlowTheme.of(context)
  1248. .titleSmall
  1249. .fontStyle,
  1250. ),
  1251. elevation: 0.0,
  1252. borderRadius:
  1253. BorderRadius.circular(8.0),
  1254. ),
  1255. ),
  1256. ],
  1257. ),
  1258. ),
  1259. ],
  1260. ),
  1261. ],
  1262. ),
  1263. ),
  1264. ],
  1265. ),
  1266. ),
  1267. ],
  1268. ),
  1269. ),
  1270. ),
  1271. );
  1272. }
  1273. }