favorieten_copy2_widget.dart 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183
  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_copy2_model.dart';
  20. export 'favorieten_copy2_model.dart';
  21. class FavorietenCopy2Widget extends StatefulWidget {
  22. const FavorietenCopy2Widget({super.key});
  23. static String routeName = 'favorietenCopy2';
  24. static String routePath = '/favorietenCopy2';
  25. @override
  26. State<FavorietenCopy2Widget> createState() => _FavorietenCopy2WidgetState();
  27. }
  28. class _FavorietenCopy2WidgetState extends State<FavorietenCopy2Widget>
  29. with TickerProviderStateMixin, RouteAware {
  30. late FavorietenCopy2Model _model;
  31. final scaffoldKey = GlobalKey<ScaffoldState>();
  32. @override
  33. void initState() {
  34. super.initState();
  35. _model = createModel(context, () => FavorietenCopy2Model());
  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(FavorietenCopy2Widget 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. 'ofwbwif7' /* Persoonlijke agenda */,
  213. ),
  214. ),
  215. Tab(
  216. text: FFLocalizations.of(context).getText(
  217. '8cew3bu9' /* Favoriete gemeenten */,
  218. ),
  219. ),
  220. Tab(
  221. text: FFLocalizations.of(context).getText(
  222. 'seg53r2c' /* Favoriete Gelegenheden */,
  223. ),
  224. ),
  225. Tab(
  226. text: FFLocalizations.of(context).getText(
  227. 'sfo0samh' /* 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=favorietenCopy2',
  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. 'Keyhj6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'] = m;
  348. },
  349. child: UitgaantabelKaartWidget(
  350. key: Key(
  351. 'Keyhj6_${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. ],
  399. ),
  400. Column(
  401. mainAxisSize: MainAxisSize.max,
  402. children: [
  403. Padding(
  404. padding: EdgeInsetsDirectional.fromSTEB(
  405. 16.0, 0.0, 16.0, 0.0),
  406. child: Text(
  407. FFLocalizations.of(context).getText(
  408. '383xnb9x' /* De gemeentes die je hebt gemar... */,
  409. ),
  410. style: FlutterFlowTheme.of(context)
  411. .bodyMedium
  412. .override(
  413. font: GoogleFonts.roboto(
  414. fontWeight:
  415. FlutterFlowTheme.of(context)
  416. .bodyMedium
  417. .fontWeight,
  418. fontStyle:
  419. FlutterFlowTheme.of(context)
  420. .bodyMedium
  421. .fontStyle,
  422. ),
  423. letterSpacing: 0.0,
  424. fontWeight: FlutterFlowTheme.of(context)
  425. .bodyMedium
  426. .fontWeight,
  427. fontStyle: FlutterFlowTheme.of(context)
  428. .bodyMedium
  429. .fontStyle,
  430. ),
  431. ),
  432. ),
  433. Expanded(
  434. child: Flex(
  435. direction: Axis.vertical,
  436. mainAxisSize: MainAxisSize.max,
  437. children: [
  438. Builder(
  439. builder: (context) {
  440. final favorieteGemeenteItem =
  441. _model.favorietenGemeenten.toList();
  442. _model.debugGeneratorVariables[
  443. 'favorieteGemeenteItem${favorieteGemeenteItem.length > 100 ? ' (first 100)' : ''}'] =
  444. debugSerializeParam(
  445. favorieteGemeenteItem.take(100),
  446. ParamType.JSON,
  447. isList: true,
  448. link:
  449. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorietenCopy2',
  450. name: 'dynamic',
  451. nullable: false,
  452. );
  453. debugLogWidgetClass(_model);
  454. return ListView.builder(
  455. padding: EdgeInsets.zero,
  456. shrinkWrap: true,
  457. scrollDirection: Axis.vertical,
  458. itemCount:
  459. favorieteGemeenteItem.length,
  460. itemBuilder: (context,
  461. favorieteGemeenteItemIndex) {
  462. final favorieteGemeenteItemItem =
  463. favorieteGemeenteItem[
  464. favorieteGemeenteItemIndex];
  465. return InkWell(
  466. splashColor: Colors.transparent,
  467. focusColor: Colors.transparent,
  468. hoverColor: Colors.transparent,
  469. highlightColor:
  470. Colors.transparent,
  471. onTap: () async {
  472. FFAppState().gemeenteSelectId =
  473. getJsonField(
  474. favorieteGemeenteItemItem,
  475. r'''$.nid''',
  476. ).toString();
  477. FFAppState()
  478. .gemeenteSelectNaam =
  479. getJsonField(
  480. favorieteGemeenteItemItem,
  481. r'''$.titel''',
  482. ).toString();
  483. FFAppState().provincieSelectId =
  484. getJsonField(
  485. favorieteGemeenteItemItem,
  486. r'''$.parent_nid''',
  487. ).toString();
  488. FFAppState()
  489. .provincieSelectName =
  490. getJsonField(
  491. favorieteGemeenteItemItem,
  492. r'''$.parent_nid''',
  493. ).toString();
  494. safeSetState(() {});
  495. context.pushNamed(
  496. HomeWidget.routeName);
  497. },
  498. child: Material(
  499. color: Colors.transparent,
  500. child: ListTile(
  501. title: Text(
  502. getJsonField(
  503. favorieteGemeenteItemItem,
  504. r'''$.titel''',
  505. ).toString(),
  506. style: FlutterFlowTheme.of(
  507. context)
  508. .titleLarge
  509. .override(
  510. font: GoogleFonts
  511. .roboto(
  512. fontWeight:
  513. FlutterFlowTheme.of(
  514. context)
  515. .titleLarge
  516. .fontWeight,
  517. fontStyle:
  518. FlutterFlowTheme.of(
  519. context)
  520. .titleLarge
  521. .fontStyle,
  522. ),
  523. letterSpacing: 0.0,
  524. fontWeight:
  525. FlutterFlowTheme.of(
  526. context)
  527. .titleLarge
  528. .fontWeight,
  529. fontStyle:
  530. FlutterFlowTheme.of(
  531. context)
  532. .titleLarge
  533. .fontStyle,
  534. ),
  535. ),
  536. subtitle: Text(
  537. FFLocalizations.of(context)
  538. .getText(
  539. '6u9p6wpc' /* Stel in als standaard */,
  540. ),
  541. style: FlutterFlowTheme.of(
  542. context)
  543. .labelMedium
  544. .override(
  545. font: GoogleFonts
  546. .roboto(
  547. fontWeight:
  548. FlutterFlowTheme.of(
  549. context)
  550. .labelMedium
  551. .fontWeight,
  552. fontStyle:
  553. FlutterFlowTheme.of(
  554. context)
  555. .labelMedium
  556. .fontStyle,
  557. ),
  558. letterSpacing: 0.0,
  559. fontWeight:
  560. FlutterFlowTheme.of(
  561. context)
  562. .labelMedium
  563. .fontWeight,
  564. fontStyle:
  565. FlutterFlowTheme.of(
  566. context)
  567. .labelMedium
  568. .fontStyle,
  569. ),
  570. ),
  571. trailing: Icon(
  572. Icons
  573. .arrow_forward_ios_rounded,
  574. color: FlutterFlowTheme.of(
  575. context)
  576. .secondaryText,
  577. size: 24.0,
  578. ),
  579. tileColor:
  580. FlutterFlowTheme.of(
  581. context)
  582. .secondaryBackground,
  583. dense: false,
  584. contentPadding:
  585. EdgeInsetsDirectional
  586. .fromSTEB(12.0, 0.0,
  587. 12.0, 0.0),
  588. shape: RoundedRectangleBorder(
  589. borderRadius:
  590. BorderRadius.circular(
  591. 8.0),
  592. ),
  593. ),
  594. ),
  595. );
  596. },
  597. );
  598. },
  599. ),
  600. ],
  601. ),
  602. ),
  603. ],
  604. ),
  605. Column(
  606. mainAxisSize: MainAxisSize.max,
  607. children: [
  608. Expanded(
  609. child: Builder(
  610. builder: (context) {
  611. final favorieteHorecagelegenheid = _model
  612. .favorieteHorecagelegenheden
  613. .toList();
  614. _model.debugGeneratorVariables[
  615. 'favorieteHorecagelegenheid${favorieteHorecagelegenheid.length > 100 ? ' (first 100)' : ''}'] =
  616. debugSerializeParam(
  617. favorieteHorecagelegenheid.take(100),
  618. ParamType.JSON,
  619. isList: true,
  620. link:
  621. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorietenCopy2',
  622. name: 'dynamic',
  623. nullable: false,
  624. );
  625. debugLogWidgetClass(_model);
  626. return MasonryGridView.builder(
  627. gridDelegate:
  628. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  629. crossAxisCount: () {
  630. if (MediaQuery.sizeOf(context).width <
  631. kBreakpointSmall) {
  632. return 1;
  633. } else if (MediaQuery.sizeOf(context)
  634. .width <
  635. kBreakpointMedium) {
  636. return 1;
  637. } else if (MediaQuery.sizeOf(context)
  638. .width <
  639. kBreakpointLarge) {
  640. return 2;
  641. } else {
  642. return 3;
  643. }
  644. }(),
  645. ),
  646. crossAxisSpacing: 10.0,
  647. mainAxisSpacing: 10.0,
  648. itemCount:
  649. favorieteHorecagelegenheid.length,
  650. itemBuilder: (context,
  651. favorieteHorecagelegenheidIndex) {
  652. final favorieteHorecagelegenheidItem =
  653. favorieteHorecagelegenheid[
  654. favorieteHorecagelegenheidIndex];
  655. return InkWell(
  656. splashColor: Colors.transparent,
  657. focusColor: Colors.transparent,
  658. hoverColor: Colors.transparent,
  659. highlightColor: Colors.transparent,
  660. onTap: () async {
  661. context.pushNamed(
  662. HorecagelegenheidCurrentWidget
  663. .routeName,
  664. queryParameters: {
  665. 'nid': serializeParam(
  666. getJsonField(
  667. favorieteHorecagelegenheidItem,
  668. r'''$.nid''',
  669. ).toString(),
  670. ParamType.String,
  671. ),
  672. }.withoutNulls,
  673. );
  674. },
  675. child: Builder(builder: (_) {
  676. return DebugFlutterFlowModelContext(
  677. rootModel: _model.rootModel,
  678. parentModelCallback: (m) {
  679. _model.horecagelegenheidoverzichtKaartModels[
  680. 'Keylrr_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'] = m;
  681. },
  682. child:
  683. HorecagelegenheidoverzichtKaartWidget(
  684. key: Key(
  685. 'Keylrr_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'),
  686. titel: getJsonField(
  687. favorieteHorecagelegenheidItem,
  688. r'''$.titel''',
  689. ).toString(),
  690. logo: getJsonField(
  691. favorieteHorecagelegenheidItem,
  692. r'''$.logo''',
  693. ).toString(),
  694. nid: getJsonField(
  695. favorieteHorecagelegenheidItem,
  696. r'''$.nid''',
  697. ).toString(),
  698. adres: getJsonField(
  699. favorieteHorecagelegenheidItem,
  700. r'''$.adres''',
  701. ).toString(),
  702. plaats: getJsonField(
  703. favorieteHorecagelegenheidItem,
  704. r'''$.plaats''',
  705. ).toString(),
  706. categorie: (getJsonField(
  707. favorieteHorecagelegenheidItem,
  708. r'''$.categorie''',
  709. true,
  710. ) as List?)
  711. ?.map<String>(
  712. (e) => e.toString())
  713. .toList()
  714. .cast<String>(),
  715. ),
  716. );
  717. }),
  718. );
  719. },
  720. );
  721. },
  722. ),
  723. ),
  724. ],
  725. ),
  726. Column(
  727. mainAxisSize: MainAxisSize.max,
  728. children: [
  729. if (FFAppState().userSessionid != null &&
  730. FFAppState().userSessionid != '')
  731. Column(
  732. mainAxisSize: MainAxisSize.max,
  733. children: [
  734. InkWell(
  735. splashColor: Colors.transparent,
  736. focusColor: Colors.transparent,
  737. hoverColor: Colors.transparent,
  738. highlightColor: Colors.transparent,
  739. onTap: () async {
  740. FFAppState().deleteUserToken();
  741. FFAppState().userToken = '';
  742. FFAppState().deleteUserSessionid();
  743. FFAppState().userSessionid = '';
  744. FFAppState().deleteUserSessionname();
  745. FFAppState().userSessionname = '';
  746. FFAppState().deleteUserName();
  747. FFAppState().userName = '';
  748. FFAppState().deleteUserUid();
  749. FFAppState().userUid = 0;
  750. FFAppState().deleteUserMail();
  751. FFAppState().userMail = '';
  752. safeSetState(() {});
  753. context.goNamed(LoginWidget.routeName);
  754. },
  755. child: Material(
  756. color: Colors.transparent,
  757. child: ListTile(
  758. title: Text(
  759. FFLocalizations.of(context).getText(
  760. '68fg2jjh' /* Uitloggen */,
  761. ),
  762. style: FlutterFlowTheme.of(context)
  763. .titleLarge
  764. .override(
  765. font: GoogleFonts.roboto(
  766. fontWeight:
  767. FlutterFlowTheme.of(
  768. context)
  769. .titleLarge
  770. .fontWeight,
  771. fontStyle:
  772. FlutterFlowTheme.of(
  773. context)
  774. .titleLarge
  775. .fontStyle,
  776. ),
  777. letterSpacing: 0.0,
  778. fontWeight:
  779. FlutterFlowTheme.of(
  780. context)
  781. .titleLarge
  782. .fontWeight,
  783. fontStyle:
  784. FlutterFlowTheme.of(
  785. context)
  786. .titleLarge
  787. .fontStyle,
  788. ),
  789. ),
  790. trailing: Icon(
  791. Icons.arrow_forward_ios_rounded,
  792. color: FlutterFlowTheme.of(context)
  793. .secondaryText,
  794. size: 24.0,
  795. ),
  796. tileColor:
  797. FlutterFlowTheme.of(context)
  798. .secondaryBackground,
  799. dense: false,
  800. contentPadding:
  801. EdgeInsetsDirectional.fromSTEB(
  802. 12.0, 0.0, 12.0, 0.0),
  803. shape: RoundedRectangleBorder(
  804. borderRadius:
  805. BorderRadius.circular(8.0),
  806. ),
  807. ),
  808. ),
  809. ),
  810. InkWell(
  811. splashColor: Colors.transparent,
  812. focusColor: Colors.transparent,
  813. hoverColor: Colors.transparent,
  814. highlightColor: Colors.transparent,
  815. onTap: () async {
  816. context.pushNamed(
  817. MijnProfielWidget.routeName);
  818. },
  819. child: Material(
  820. color: Colors.transparent,
  821. child: ListTile(
  822. title: Text(
  823. FFLocalizations.of(context).getText(
  824. 'a25sqwjm' /* Mijn profiel */,
  825. ),
  826. style: FlutterFlowTheme.of(context)
  827. .titleLarge
  828. .override(
  829. font: GoogleFonts.roboto(
  830. fontWeight:
  831. FlutterFlowTheme.of(
  832. context)
  833. .titleLarge
  834. .fontWeight,
  835. fontStyle:
  836. FlutterFlowTheme.of(
  837. context)
  838. .titleLarge
  839. .fontStyle,
  840. ),
  841. letterSpacing: 0.0,
  842. fontWeight:
  843. FlutterFlowTheme.of(
  844. context)
  845. .titleLarge
  846. .fontWeight,
  847. fontStyle:
  848. FlutterFlowTheme.of(
  849. context)
  850. .titleLarge
  851. .fontStyle,
  852. ),
  853. ),
  854. trailing: Icon(
  855. Icons.arrow_forward_ios_rounded,
  856. color: FlutterFlowTheme.of(context)
  857. .secondaryText,
  858. size: 24.0,
  859. ),
  860. tileColor:
  861. FlutterFlowTheme.of(context)
  862. .secondaryBackground,
  863. dense: false,
  864. contentPadding:
  865. EdgeInsetsDirectional.fromSTEB(
  866. 12.0, 0.0, 12.0, 0.0),
  867. shape: RoundedRectangleBorder(
  868. borderRadius:
  869. BorderRadius.circular(8.0),
  870. ),
  871. ),
  872. ),
  873. ),
  874. InkWell(
  875. splashColor: Colors.transparent,
  876. focusColor: Colors.transparent,
  877. hoverColor: Colors.transparent,
  878. highlightColor: Colors.transparent,
  879. onTap: () async {
  880. context.pushNamed(
  881. WachtwoordVergetenWidget.routeName);
  882. },
  883. child: Material(
  884. color: Colors.transparent,
  885. child: ListTile(
  886. title: Text(
  887. FFLocalizations.of(context).getText(
  888. 'xp20ia8a' /* Wachtwoord wijzigen */,
  889. ),
  890. style: FlutterFlowTheme.of(context)
  891. .titleLarge
  892. .override(
  893. font: GoogleFonts.roboto(
  894. fontWeight:
  895. FlutterFlowTheme.of(
  896. context)
  897. .titleLarge
  898. .fontWeight,
  899. fontStyle:
  900. FlutterFlowTheme.of(
  901. context)
  902. .titleLarge
  903. .fontStyle,
  904. ),
  905. letterSpacing: 0.0,
  906. fontWeight:
  907. FlutterFlowTheme.of(
  908. context)
  909. .titleLarge
  910. .fontWeight,
  911. fontStyle:
  912. FlutterFlowTheme.of(
  913. context)
  914. .titleLarge
  915. .fontStyle,
  916. ),
  917. ),
  918. trailing: Icon(
  919. Icons.arrow_forward_ios_rounded,
  920. color: FlutterFlowTheme.of(context)
  921. .secondaryText,
  922. size: 24.0,
  923. ),
  924. tileColor:
  925. FlutterFlowTheme.of(context)
  926. .secondaryBackground,
  927. dense: false,
  928. contentPadding:
  929. EdgeInsetsDirectional.fromSTEB(
  930. 12.0, 0.0, 12.0, 0.0),
  931. shape: RoundedRectangleBorder(
  932. borderRadius:
  933. BorderRadius.circular(8.0),
  934. ),
  935. ),
  936. ),
  937. ),
  938. InkWell(
  939. splashColor: Colors.transparent,
  940. focusColor: Colors.transparent,
  941. hoverColor: Colors.transparent,
  942. highlightColor: Colors.transparent,
  943. onTap: () async {
  944. unawaited(
  945. () async {
  946. await launchURL(
  947. 'https://uitgaanskrant.com/nl/account-verwijderen');
  948. }(),
  949. );
  950. },
  951. child: Material(
  952. color: Colors.transparent,
  953. child: ListTile(
  954. title: Text(
  955. FFLocalizations.of(context).getText(
  956. 'ddxbhe0n' /* Account verwijderen */,
  957. ),
  958. style: FlutterFlowTheme.of(context)
  959. .titleLarge
  960. .override(
  961. font: GoogleFonts.roboto(
  962. fontWeight:
  963. FlutterFlowTheme.of(
  964. context)
  965. .titleLarge
  966. .fontWeight,
  967. fontStyle:
  968. FlutterFlowTheme.of(
  969. context)
  970. .titleLarge
  971. .fontStyle,
  972. ),
  973. letterSpacing: 0.0,
  974. fontWeight:
  975. FlutterFlowTheme.of(
  976. context)
  977. .titleLarge
  978. .fontWeight,
  979. fontStyle:
  980. FlutterFlowTheme.of(
  981. context)
  982. .titleLarge
  983. .fontStyle,
  984. ),
  985. ),
  986. trailing: Icon(
  987. Icons.arrow_forward_ios_rounded,
  988. color: FlutterFlowTheme.of(context)
  989. .secondaryText,
  990. size: 24.0,
  991. ),
  992. tileColor:
  993. FlutterFlowTheme.of(context)
  994. .secondaryBackground,
  995. dense: false,
  996. contentPadding:
  997. EdgeInsetsDirectional.fromSTEB(
  998. 12.0, 0.0, 12.0, 0.0),
  999. shape: RoundedRectangleBorder(
  1000. borderRadius:
  1001. BorderRadius.circular(8.0),
  1002. ),
  1003. ),
  1004. ),
  1005. ),
  1006. FFButtonWidget(
  1007. onPressed: () async {
  1008. context.pushNamed(
  1009. StadsactiviteitAanmakenWidget
  1010. .routeName);
  1011. },
  1012. text: FFLocalizations.of(context).getText(
  1013. 'sv0h9ta3' /* Stadsactiviteit aanmaken */,
  1014. ),
  1015. options: FFButtonOptions(
  1016. height: 40.0,
  1017. padding: EdgeInsetsDirectional.fromSTEB(
  1018. 16.0, 0.0, 16.0, 0.0),
  1019. iconPadding:
  1020. EdgeInsetsDirectional.fromSTEB(
  1021. 0.0, 0.0, 0.0, 0.0),
  1022. color: FlutterFlowTheme.of(context)
  1023. .secondary,
  1024. textStyle: FlutterFlowTheme.of(context)
  1025. .titleSmall
  1026. .override(
  1027. font: GoogleFonts.roboto(
  1028. fontWeight:
  1029. FlutterFlowTheme.of(context)
  1030. .titleSmall
  1031. .fontWeight,
  1032. fontStyle:
  1033. FlutterFlowTheme.of(context)
  1034. .titleSmall
  1035. .fontStyle,
  1036. ),
  1037. color: Colors.white,
  1038. letterSpacing: 0.0,
  1039. fontWeight:
  1040. FlutterFlowTheme.of(context)
  1041. .titleSmall
  1042. .fontWeight,
  1043. fontStyle:
  1044. FlutterFlowTheme.of(context)
  1045. .titleSmall
  1046. .fontStyle,
  1047. ),
  1048. elevation: 0.0,
  1049. borderRadius:
  1050. BorderRadius.circular(8.0),
  1051. ),
  1052. ),
  1053. Text(
  1054. valueOrDefault<String>(
  1055. functions.buildStempel(),
  1056. 'buildStempel',
  1057. ),
  1058. style: FlutterFlowTheme.of(context)
  1059. .bodyMedium
  1060. .override(
  1061. font: GoogleFonts.roboto(
  1062. fontWeight:
  1063. FlutterFlowTheme.of(context)
  1064. .bodyMedium
  1065. .fontWeight,
  1066. fontStyle:
  1067. FlutterFlowTheme.of(context)
  1068. .bodyMedium
  1069. .fontStyle,
  1070. ),
  1071. letterSpacing: 0.0,
  1072. fontWeight:
  1073. FlutterFlowTheme.of(context)
  1074. .bodyMedium
  1075. .fontWeight,
  1076. fontStyle:
  1077. FlutterFlowTheme.of(context)
  1078. .bodyMedium
  1079. .fontStyle,
  1080. ),
  1081. ),
  1082. ],
  1083. ),
  1084. if (FFAppState().userSessionid == null ||
  1085. FFAppState().userSessionid == '')
  1086. Column(
  1087. mainAxisSize: MainAxisSize.max,
  1088. children: [
  1089. FFButtonWidget(
  1090. onPressed: () {
  1091. print('Button pressed ...');
  1092. },
  1093. text: FFLocalizations.of(context).getText(
  1094. 'amde2yb9' /* Button */,
  1095. ),
  1096. options: FFButtonOptions(
  1097. height: 40.0,
  1098. padding: EdgeInsetsDirectional.fromSTEB(
  1099. 16.0, 0.0, 16.0, 0.0),
  1100. iconPadding:
  1101. EdgeInsetsDirectional.fromSTEB(
  1102. 0.0, 0.0, 0.0, 0.0),
  1103. color: FlutterFlowTheme.of(context)
  1104. .primary,
  1105. textStyle: FlutterFlowTheme.of(context)
  1106. .titleSmall
  1107. .override(
  1108. font: GoogleFonts.roboto(
  1109. fontWeight:
  1110. FlutterFlowTheme.of(context)
  1111. .titleSmall
  1112. .fontWeight,
  1113. fontStyle:
  1114. FlutterFlowTheme.of(context)
  1115. .titleSmall
  1116. .fontStyle,
  1117. ),
  1118. color: Colors.white,
  1119. letterSpacing: 0.0,
  1120. fontWeight:
  1121. FlutterFlowTheme.of(context)
  1122. .titleSmall
  1123. .fontWeight,
  1124. fontStyle:
  1125. FlutterFlowTheme.of(context)
  1126. .titleSmall
  1127. .fontStyle,
  1128. ),
  1129. elevation: 0.0,
  1130. borderRadius:
  1131. BorderRadius.circular(8.0),
  1132. ),
  1133. ),
  1134. ],
  1135. ),
  1136. ],
  1137. ),
  1138. ],
  1139. ),
  1140. ),
  1141. ],
  1142. ),
  1143. ),
  1144. ],
  1145. ),
  1146. ),
  1147. ),
  1148. );
  1149. }
  1150. }