favorieten_widget.dart 58 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090
  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. ],
  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. 'o7pt2vls' /* 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=favorieten',
  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. 'jm4s7cdn' /* 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=favorieten',
  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. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'] = m;
  681. },
  682. child:
  683. HorecagelegenheidoverzichtKaartWidget(
  684. key: Key(
  685. 'Keycet_${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. InkWell(
  730. splashColor: Colors.transparent,
  731. focusColor: Colors.transparent,
  732. hoverColor: Colors.transparent,
  733. highlightColor: Colors.transparent,
  734. onTap: () async {
  735. FFAppState().deleteUserToken();
  736. FFAppState().userToken = '';
  737. FFAppState().deleteUserSessionid();
  738. FFAppState().userSessionid = '';
  739. FFAppState().deleteUserSessionname();
  740. FFAppState().userSessionname = '';
  741. FFAppState().deleteUserName();
  742. FFAppState().userName = '';
  743. FFAppState().deleteUserUid();
  744. FFAppState().userUid = 0;
  745. FFAppState().deleteUserMail();
  746. FFAppState().userMail = '';
  747. safeSetState(() {});
  748. context.goNamed(LoginWidget.routeName);
  749. },
  750. child: Material(
  751. color: Colors.transparent,
  752. child: ListTile(
  753. title: Text(
  754. FFLocalizations.of(context).getText(
  755. '275gmehq' /* Uitloggen */,
  756. ),
  757. style: FlutterFlowTheme.of(context)
  758. .titleLarge
  759. .override(
  760. font: GoogleFonts.roboto(
  761. fontWeight:
  762. FlutterFlowTheme.of(context)
  763. .titleLarge
  764. .fontWeight,
  765. fontStyle:
  766. FlutterFlowTheme.of(context)
  767. .titleLarge
  768. .fontStyle,
  769. ),
  770. letterSpacing: 0.0,
  771. fontWeight:
  772. FlutterFlowTheme.of(context)
  773. .titleLarge
  774. .fontWeight,
  775. fontStyle:
  776. FlutterFlowTheme.of(context)
  777. .titleLarge
  778. .fontStyle,
  779. ),
  780. ),
  781. trailing: Icon(
  782. Icons.arrow_forward_ios_rounded,
  783. color: FlutterFlowTheme.of(context)
  784. .secondaryText,
  785. size: 24.0,
  786. ),
  787. tileColor: FlutterFlowTheme.of(context)
  788. .secondaryBackground,
  789. dense: false,
  790. contentPadding:
  791. EdgeInsetsDirectional.fromSTEB(
  792. 12.0, 0.0, 12.0, 0.0),
  793. shape: RoundedRectangleBorder(
  794. borderRadius: BorderRadius.circular(8.0),
  795. ),
  796. ),
  797. ),
  798. ),
  799. InkWell(
  800. splashColor: Colors.transparent,
  801. focusColor: Colors.transparent,
  802. hoverColor: Colors.transparent,
  803. highlightColor: Colors.transparent,
  804. onTap: () async {
  805. context
  806. .pushNamed(MijnProfielWidget.routeName);
  807. },
  808. child: Material(
  809. color: Colors.transparent,
  810. child: ListTile(
  811. title: Text(
  812. FFLocalizations.of(context).getText(
  813. 'pdzmzb1p' /* Mijn profiel */,
  814. ),
  815. style: FlutterFlowTheme.of(context)
  816. .titleLarge
  817. .override(
  818. font: GoogleFonts.roboto(
  819. fontWeight:
  820. FlutterFlowTheme.of(context)
  821. .titleLarge
  822. .fontWeight,
  823. fontStyle:
  824. FlutterFlowTheme.of(context)
  825. .titleLarge
  826. .fontStyle,
  827. ),
  828. letterSpacing: 0.0,
  829. fontWeight:
  830. FlutterFlowTheme.of(context)
  831. .titleLarge
  832. .fontWeight,
  833. fontStyle:
  834. FlutterFlowTheme.of(context)
  835. .titleLarge
  836. .fontStyle,
  837. ),
  838. ),
  839. trailing: Icon(
  840. Icons.arrow_forward_ios_rounded,
  841. color: FlutterFlowTheme.of(context)
  842. .secondaryText,
  843. size: 24.0,
  844. ),
  845. tileColor: FlutterFlowTheme.of(context)
  846. .secondaryBackground,
  847. dense: false,
  848. contentPadding:
  849. EdgeInsetsDirectional.fromSTEB(
  850. 12.0, 0.0, 12.0, 0.0),
  851. shape: RoundedRectangleBorder(
  852. borderRadius: BorderRadius.circular(8.0),
  853. ),
  854. ),
  855. ),
  856. ),
  857. InkWell(
  858. splashColor: Colors.transparent,
  859. focusColor: Colors.transparent,
  860. hoverColor: Colors.transparent,
  861. highlightColor: Colors.transparent,
  862. onTap: () async {
  863. context.pushNamed(
  864. WachtwoordVergetenWidget.routeName);
  865. },
  866. child: Material(
  867. color: Colors.transparent,
  868. child: ListTile(
  869. title: Text(
  870. FFLocalizations.of(context).getText(
  871. 'ogz7q3xk' /* Wachtwoord wijzigen */,
  872. ),
  873. style: FlutterFlowTheme.of(context)
  874. .titleLarge
  875. .override(
  876. font: GoogleFonts.roboto(
  877. fontWeight:
  878. FlutterFlowTheme.of(context)
  879. .titleLarge
  880. .fontWeight,
  881. fontStyle:
  882. FlutterFlowTheme.of(context)
  883. .titleLarge
  884. .fontStyle,
  885. ),
  886. letterSpacing: 0.0,
  887. fontWeight:
  888. FlutterFlowTheme.of(context)
  889. .titleLarge
  890. .fontWeight,
  891. fontStyle:
  892. FlutterFlowTheme.of(context)
  893. .titleLarge
  894. .fontStyle,
  895. ),
  896. ),
  897. trailing: Icon(
  898. Icons.arrow_forward_ios_rounded,
  899. color: FlutterFlowTheme.of(context)
  900. .secondaryText,
  901. size: 24.0,
  902. ),
  903. tileColor: FlutterFlowTheme.of(context)
  904. .secondaryBackground,
  905. dense: false,
  906. contentPadding:
  907. EdgeInsetsDirectional.fromSTEB(
  908. 12.0, 0.0, 12.0, 0.0),
  909. shape: RoundedRectangleBorder(
  910. borderRadius: BorderRadius.circular(8.0),
  911. ),
  912. ),
  913. ),
  914. ),
  915. InkWell(
  916. splashColor: Colors.transparent,
  917. focusColor: Colors.transparent,
  918. hoverColor: Colors.transparent,
  919. highlightColor: Colors.transparent,
  920. onTap: () async {
  921. unawaited(
  922. () async {
  923. await launchURL(
  924. 'https://uitgaanskrant.com/nl/account-verwijderen');
  925. }(),
  926. );
  927. },
  928. child: Material(
  929. color: Colors.transparent,
  930. child: ListTile(
  931. title: Text(
  932. FFLocalizations.of(context).getText(
  933. 'i31b4itp' /* Account verwijderen */,
  934. ),
  935. style: FlutterFlowTheme.of(context)
  936. .titleLarge
  937. .override(
  938. font: GoogleFonts.roboto(
  939. fontWeight:
  940. FlutterFlowTheme.of(context)
  941. .titleLarge
  942. .fontWeight,
  943. fontStyle:
  944. FlutterFlowTheme.of(context)
  945. .titleLarge
  946. .fontStyle,
  947. ),
  948. letterSpacing: 0.0,
  949. fontWeight:
  950. FlutterFlowTheme.of(context)
  951. .titleLarge
  952. .fontWeight,
  953. fontStyle:
  954. FlutterFlowTheme.of(context)
  955. .titleLarge
  956. .fontStyle,
  957. ),
  958. ),
  959. trailing: Icon(
  960. Icons.arrow_forward_ios_rounded,
  961. color: FlutterFlowTheme.of(context)
  962. .secondaryText,
  963. size: 24.0,
  964. ),
  965. tileColor: FlutterFlowTheme.of(context)
  966. .secondaryBackground,
  967. dense: false,
  968. contentPadding:
  969. EdgeInsetsDirectional.fromSTEB(
  970. 12.0, 0.0, 12.0, 0.0),
  971. shape: RoundedRectangleBorder(
  972. borderRadius: BorderRadius.circular(8.0),
  973. ),
  974. ),
  975. ),
  976. ),
  977. FFButtonWidget(
  978. onPressed: () async {
  979. context.pushNamed(
  980. StadsactiviteitAanmakenWidget.routeName);
  981. },
  982. text: FFLocalizations.of(context).getText(
  983. 'fbl4ak2y' /* Stadsactiviteit aanmaken */,
  984. ),
  985. options: FFButtonOptions(
  986. height: 40.0,
  987. padding: EdgeInsetsDirectional.fromSTEB(
  988. 16.0, 0.0, 16.0, 0.0),
  989. iconPadding: EdgeInsetsDirectional.fromSTEB(
  990. 0.0, 0.0, 0.0, 0.0),
  991. color: FlutterFlowTheme.of(context).secondary,
  992. textStyle: FlutterFlowTheme.of(context)
  993. .titleSmall
  994. .override(
  995. font: GoogleFonts.roboto(
  996. fontWeight:
  997. FlutterFlowTheme.of(context)
  998. .titleSmall
  999. .fontWeight,
  1000. fontStyle:
  1001. FlutterFlowTheme.of(context)
  1002. .titleSmall
  1003. .fontStyle,
  1004. ),
  1005. color: Colors.white,
  1006. letterSpacing: 0.0,
  1007. fontWeight: FlutterFlowTheme.of(context)
  1008. .titleSmall
  1009. .fontWeight,
  1010. fontStyle: FlutterFlowTheme.of(context)
  1011. .titleSmall
  1012. .fontStyle,
  1013. ),
  1014. elevation: 0.0,
  1015. borderRadius: BorderRadius.circular(8.0),
  1016. ),
  1017. ),
  1018. Text(
  1019. valueOrDefault<String>(
  1020. functions.buildStempel(),
  1021. 'buildStempel',
  1022. ),
  1023. style: FlutterFlowTheme.of(context)
  1024. .bodyMedium
  1025. .override(
  1026. font: GoogleFonts.roboto(
  1027. fontWeight: FlutterFlowTheme.of(context)
  1028. .bodyMedium
  1029. .fontWeight,
  1030. fontStyle: FlutterFlowTheme.of(context)
  1031. .bodyMedium
  1032. .fontStyle,
  1033. ),
  1034. letterSpacing: 0.0,
  1035. fontWeight: FlutterFlowTheme.of(context)
  1036. .bodyMedium
  1037. .fontWeight,
  1038. fontStyle: FlutterFlowTheme.of(context)
  1039. .bodyMedium
  1040. .fontStyle,
  1041. ),
  1042. ),
  1043. ],
  1044. ),
  1045. ],
  1046. ),
  1047. ),
  1048. ],
  1049. ),
  1050. ),
  1051. ],
  1052. ),
  1053. ),
  1054. ),
  1055. );
  1056. }
  1057. }