favorieten_widget.dart 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384
  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 '/shared/lege_lijst_melding/lege_lijst_melding_widget.dart';
  8. import '/uitgaanspaginas/uitgaantabel_kaart/uitgaantabel_kaart_widget.dart';
  9. import 'dart:async';
  10. import 'dart:ui';
  11. import '/custom_code/actions/index.dart' as actions;
  12. import '/flutter_flow/custom_functions.dart' as functions;
  13. import '/index.dart';
  14. import 'package:flutter/material.dart';
  15. import 'package:flutter/scheduler.dart';
  16. import 'package:flutter_spinkit/flutter_spinkit.dart';
  17. import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
  18. import 'package:google_fonts/google_fonts.dart';
  19. import 'package:provider/provider.dart';
  20. import 'favorieten_model.dart';
  21. export 'favorieten_model.dart';
  22. class FavorietenWidget extends StatefulWidget {
  23. const FavorietenWidget({super.key});
  24. static String routeName = 'favorieten';
  25. static String routePath = '/favorieten';
  26. @override
  27. State<FavorietenWidget> createState() => _FavorietenWidgetState();
  28. }
  29. class _FavorietenWidgetState extends State<FavorietenWidget>
  30. with TickerProviderStateMixin, RouteAware {
  31. late FavorietenModel _model;
  32. final scaffoldKey = GlobalKey<ScaffoldState>();
  33. @override
  34. void initState() {
  35. super.initState();
  36. _model = createModel(context, () => FavorietenModel());
  37. // On page load action.
  38. SchedulerBinding.instance.addPostFrameCallback((_) async {
  39. _model.responseActionDrupalRequestPageLoad = await actions.drupalRequest(
  40. 'GET',
  41. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_agenda.json',
  42. FFAppState().userSessionname,
  43. FFAppState().userSessionid,
  44. FFAppState().userToken,
  45. '',
  46. );
  47. _model.favorietenAgenda =
  48. _model.responseActionDrupalRequestPageLoad!.toList().cast<dynamic>();
  49. safeSetState(() {});
  50. });
  51. _model.tabBarController = TabController(
  52. vsync: this,
  53. length: 4,
  54. initialIndex: 0,
  55. )
  56. ..addListener(() => safeSetState(() {}))
  57. ..addListener(() {
  58. debugLogWidgetClass(_model);
  59. });
  60. }
  61. @override
  62. void dispose() {
  63. routeObserver.unsubscribe(this);
  64. _model.dispose();
  65. super.dispose();
  66. }
  67. @override
  68. void didUpdateWidget(FavorietenWidget oldWidget) {
  69. super.didUpdateWidget(oldWidget);
  70. _model.widget = widget;
  71. }
  72. @override
  73. void didChangeDependencies() {
  74. super.didChangeDependencies();
  75. final route = DebugModalRoute.of(context);
  76. if (route != null) {
  77. routeObserver.subscribe(this, route);
  78. }
  79. debugLogGlobalProperty(context);
  80. }
  81. @override
  82. void didPopNext() {
  83. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  84. setState(() => _model.isRouteVisible = true);
  85. debugLogWidgetClass(_model);
  86. }
  87. }
  88. @override
  89. void didPush() {
  90. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  91. setState(() => _model.isRouteVisible = true);
  92. debugLogWidgetClass(_model);
  93. }
  94. }
  95. @override
  96. void didPop() {
  97. _model.isRouteVisible = false;
  98. }
  99. @override
  100. void didPushNext() {
  101. _model.isRouteVisible = false;
  102. }
  103. @override
  104. Widget build(BuildContext context) {
  105. DebugFlutterFlowModelContext.maybeOf(context)
  106. ?.parentModelCallback
  107. ?.call(_model);
  108. context.watch<FFAppState>();
  109. _model.uitgaantabelKaartModels.clear();
  110. _model.horecagelegenheidoverzichtKaartModels.clear();
  111. return GestureDetector(
  112. onTap: () {
  113. FocusScope.of(context).unfocus();
  114. FocusManager.instance.primaryFocus?.unfocus();
  115. },
  116. child: Scaffold(
  117. key: scaffoldKey,
  118. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  119. drawer: Drawer(
  120. elevation: 16.0,
  121. child: wrapWithModel(
  122. model: _model.drawerComponentModel,
  123. updateCallback: () => safeSetState(() {}),
  124. child: Builder(builder: (_) {
  125. return DebugFlutterFlowModelContext(
  126. rootModel: _model.rootModel,
  127. child: DrawerComponentWidget(),
  128. );
  129. }),
  130. ),
  131. ),
  132. appBar: PreferredSize(
  133. preferredSize: Size.fromHeight(80.0),
  134. child: AppBar(
  135. backgroundColor: FlutterFlowTheme.of(context).primaryText,
  136. automaticallyImplyLeading: false,
  137. actions: [],
  138. flexibleSpace: FlexibleSpaceBar(
  139. title: wrapWithModel(
  140. model: _model.headerButtonsComponentModel,
  141. updateCallback: () => safeSetState(() {}),
  142. child: Builder(builder: (_) {
  143. return DebugFlutterFlowModelContext(
  144. rootModel: _model.rootModel,
  145. child: HeaderButtonsComponentWidget(
  146. showBackButton: false,
  147. ),
  148. );
  149. }),
  150. ),
  151. centerTitle: true,
  152. expandedTitleScale: 1.0,
  153. ),
  154. elevation: 0.0,
  155. ),
  156. ),
  157. body: SafeArea(
  158. top: true,
  159. child: Column(
  160. mainAxisSize: MainAxisSize.max,
  161. children: [
  162. Expanded(
  163. child: Column(
  164. children: [
  165. Align(
  166. alignment: Alignment(0.0, 0),
  167. child: TabBar(
  168. isScrollable: true,
  169. tabAlignment: TabAlignment.center,
  170. labelColor: FlutterFlowTheme.of(context).primaryText,
  171. unselectedLabelColor:
  172. FlutterFlowTheme.of(context).secondaryText,
  173. labelStyle:
  174. FlutterFlowTheme.of(context).titleMedium.override(
  175. font: GoogleFonts.roboto(
  176. fontWeight: FlutterFlowTheme.of(context)
  177. .titleMedium
  178. .fontWeight,
  179. fontStyle: FlutterFlowTheme.of(context)
  180. .titleMedium
  181. .fontStyle,
  182. ),
  183. letterSpacing: 0.0,
  184. fontWeight: FlutterFlowTheme.of(context)
  185. .titleMedium
  186. .fontWeight,
  187. fontStyle: FlutterFlowTheme.of(context)
  188. .titleMedium
  189. .fontStyle,
  190. ),
  191. unselectedLabelStyle:
  192. FlutterFlowTheme.of(context).titleMedium.override(
  193. font: GoogleFonts.roboto(
  194. fontWeight: FlutterFlowTheme.of(context)
  195. .titleMedium
  196. .fontWeight,
  197. fontStyle: FlutterFlowTheme.of(context)
  198. .titleMedium
  199. .fontStyle,
  200. ),
  201. letterSpacing: 0.0,
  202. fontWeight: FlutterFlowTheme.of(context)
  203. .titleMedium
  204. .fontWeight,
  205. fontStyle: FlutterFlowTheme.of(context)
  206. .titleMedium
  207. .fontStyle,
  208. ),
  209. indicatorColor: FlutterFlowTheme.of(context).secondary,
  210. tabs: [
  211. Tab(
  212. text: FFLocalizations.of(context).getText(
  213. 'txq7zl0f' /* Persoonlijke agenda */,
  214. ),
  215. ),
  216. Tab(
  217. text: FFLocalizations.of(context).getText(
  218. '9wq117bv' /* Favoriete gemeenten */,
  219. ),
  220. ),
  221. Tab(
  222. text: FFLocalizations.of(context).getText(
  223. 'ygk8aifq' /* Favoriete gelegenheden */,
  224. ),
  225. ),
  226. Tab(
  227. text: FFLocalizations.of(context).getText(
  228. '2nyldbpj' /* Gebruiker */,
  229. ),
  230. ),
  231. ],
  232. controller: _model.tabBarController,
  233. onTap: (i) async {
  234. [
  235. () async {
  236. _model.responsActionDrupalRequest =
  237. await actions.drupalRequest(
  238. 'GET',
  239. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_agenda.json',
  240. FFAppState().userSessionname,
  241. FFAppState().userSessionid,
  242. FFAppState().userToken,
  243. '',
  244. );
  245. _model.favorietenAgenda = _model
  246. .responsActionDrupalRequest!
  247. .toList()
  248. .cast<dynamic>();
  249. safeSetState(() {});
  250. safeSetState(() {});
  251. },
  252. () async {
  253. _model.resultFavorietegemeenten =
  254. await actions.drupalRequest(
  255. 'GET',
  256. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_gemeenten.json',
  257. FFAppState().userSessionname,
  258. FFAppState().userSessionid,
  259. FFAppState().userToken,
  260. '',
  261. );
  262. _model.favorietenGemeenten = _model
  263. .resultFavorietegemeenten!
  264. .toList()
  265. .cast<dynamic>();
  266. safeSetState(() {});
  267. safeSetState(() {});
  268. },
  269. () async {
  270. _model.responseFavorieteHoreca =
  271. await actions.drupalRequest(
  272. 'GET',
  273. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_horeca.json',
  274. FFAppState().userSessionname,
  275. FFAppState().userSessionid,
  276. FFAppState().userToken,
  277. '',
  278. );
  279. _model.favorieteHorecagelegenheden = _model
  280. .responseFavorieteHoreca!
  281. .toList()
  282. .cast<dynamic>();
  283. safeSetState(() {});
  284. safeSetState(() {});
  285. },
  286. () async {}
  287. ][i]();
  288. },
  289. ),
  290. ),
  291. Expanded(
  292. child: TabBarView(
  293. controller: _model.tabBarController,
  294. children: [
  295. Column(
  296. mainAxisSize: MainAxisSize.max,
  297. children: [
  298. Padding(
  299. padding: EdgeInsetsDirectional.fromSTEB(
  300. 16.0, 0.0, 16.0, 8.0),
  301. child: Text(
  302. FFLocalizations.of(context).getText(
  303. '48axn1wj' /* * op basis van favoriete horec... */,
  304. ),
  305. style: FlutterFlowTheme.of(context)
  306. .bodySmall
  307. .override(
  308. font: GoogleFonts.roboto(
  309. fontWeight:
  310. FlutterFlowTheme.of(context)
  311. .bodySmall
  312. .fontWeight,
  313. fontStyle:
  314. FlutterFlowTheme.of(context)
  315. .bodySmall
  316. .fontStyle,
  317. ),
  318. color: FlutterFlowTheme.of(context)
  319. .secondaryText,
  320. letterSpacing: 0.0,
  321. fontWeight: FlutterFlowTheme.of(context)
  322. .bodySmall
  323. .fontWeight,
  324. fontStyle: FlutterFlowTheme.of(context)
  325. .bodySmall
  326. .fontStyle,
  327. ),
  328. ),
  329. ),
  330. Expanded(
  331. child: Builder(
  332. builder: (context) {
  333. final favorietenAgendaItems =
  334. _model.favorietenAgenda.toList();
  335. if (favorietenAgendaItems.isEmpty) {
  336. return LegeLijstMeldingWidget(
  337. nlTekst:
  338. 'Je persoonlijke agenda is nog leeg.',
  339. enTekst:
  340. 'Your personal agenda is still empty.',
  341. );
  342. }
  343. _model.debugGeneratorVariables[
  344. 'favorietenAgendaItems${favorietenAgendaItems.length > 100 ? ' (first 100)' : ''}'] =
  345. debugSerializeParam(
  346. favorietenAgendaItems.take(100),
  347. ParamType.JSON,
  348. isList: true,
  349. link:
  350. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  351. name: 'dynamic',
  352. nullable: false,
  353. );
  354. debugLogWidgetClass(_model);
  355. return MasonryGridView.builder(
  356. gridDelegate:
  357. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  358. crossAxisCount: () {
  359. if (MediaQuery.sizeOf(context).width <
  360. kBreakpointSmall) {
  361. return 1;
  362. } else if (MediaQuery.sizeOf(context)
  363. .width <
  364. kBreakpointMedium) {
  365. return 1;
  366. } else if (MediaQuery.sizeOf(context)
  367. .width <
  368. kBreakpointLarge) {
  369. return 2;
  370. } else {
  371. return 3;
  372. }
  373. }(),
  374. ),
  375. crossAxisSpacing: 10.0,
  376. mainAxisSpacing: 10.0,
  377. itemCount: favorietenAgendaItems.length,
  378. itemBuilder: (context,
  379. favorietenAgendaItemsIndex) {
  380. final favorietenAgendaItemsItem =
  381. favorietenAgendaItems[
  382. favorietenAgendaItemsIndex];
  383. return Builder(builder: (_) {
  384. return DebugFlutterFlowModelContext(
  385. rootModel: _model.rootModel,
  386. parentModelCallback: (m) {
  387. _model.uitgaantabelKaartModels[
  388. 'Keyiv6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'] = m;
  389. },
  390. child: UitgaantabelKaartWidget(
  391. key: Key(
  392. 'Keyiv6_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'),
  393. logo: getJsonField(
  394. favorietenAgendaItemsItem,
  395. r'''$.logo''',
  396. ),
  397. categorie: getJsonField(
  398. favorietenAgendaItemsItem,
  399. r'''$.categorie''',
  400. ),
  401. titel: getJsonField(
  402. favorietenAgendaItemsItem,
  403. r'''$.titel''',
  404. ),
  405. horecagelegenheid: getJsonField(
  406. favorietenAgendaItemsItem,
  407. r'''$.horecagelegenheid''',
  408. ),
  409. adres: getJsonField(
  410. favorietenAgendaItemsItem,
  411. r'''$.adres''',
  412. ),
  413. plaats: getJsonField(
  414. favorietenAgendaItemsItem,
  415. r'''$.plaats''',
  416. ),
  417. datum: getJsonField(
  418. favorietenAgendaItemsItem,
  419. r'''$.datum''',
  420. ),
  421. inhoud: null,
  422. nid: getJsonField(
  423. favorietenAgendaItemsItem,
  424. r'''$.nid''',
  425. ),
  426. horecagelegenheidNid:
  427. getJsonField(
  428. favorietenAgendaItemsItem,
  429. r'''$.horecagelegenheidNid''',
  430. ),
  431. ),
  432. );
  433. });
  434. },
  435. );
  436. },
  437. ),
  438. ),
  439. ],
  440. ),
  441. Column(
  442. mainAxisSize: MainAxisSize.max,
  443. children: [
  444. Padding(
  445. padding: EdgeInsetsDirectional.fromSTEB(
  446. 16.0, 0.0, 16.0, 0.0),
  447. child: Text(
  448. FFLocalizations.of(context).getText(
  449. 'o7pt2vls' /* De gemeentes die je hebt gemar... */,
  450. ),
  451. style: FlutterFlowTheme.of(context)
  452. .bodyMedium
  453. .override(
  454. font: GoogleFonts.roboto(
  455. fontWeight:
  456. FlutterFlowTheme.of(context)
  457. .bodyMedium
  458. .fontWeight,
  459. fontStyle:
  460. FlutterFlowTheme.of(context)
  461. .bodyMedium
  462. .fontStyle,
  463. ),
  464. letterSpacing: 0.0,
  465. fontWeight: FlutterFlowTheme.of(context)
  466. .bodyMedium
  467. .fontWeight,
  468. fontStyle: FlutterFlowTheme.of(context)
  469. .bodyMedium
  470. .fontStyle,
  471. ),
  472. ),
  473. ),
  474. Expanded(
  475. child: Flex(
  476. direction: Axis.vertical,
  477. mainAxisSize: MainAxisSize.max,
  478. children: [
  479. Builder(
  480. builder: (context) {
  481. final favorieteGemeenteItem =
  482. _model.favorietenGemeenten.toList();
  483. if (favorieteGemeenteItem.isEmpty) {
  484. return LegeLijstMeldingWidget(
  485. nlTekst:
  486. 'Je volgt nog geen gemeenten. ',
  487. enTekst:
  488. 'You are not following any municipalities yet.',
  489. );
  490. }
  491. _model.debugGeneratorVariables[
  492. 'favorieteGemeenteItem${favorieteGemeenteItem.length > 100 ? ' (first 100)' : ''}'] =
  493. debugSerializeParam(
  494. favorieteGemeenteItem.take(100),
  495. ParamType.JSON,
  496. isList: true,
  497. link:
  498. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  499. name: 'dynamic',
  500. nullable: false,
  501. );
  502. debugLogWidgetClass(_model);
  503. return ListView.builder(
  504. padding: EdgeInsets.zero,
  505. shrinkWrap: true,
  506. scrollDirection: Axis.vertical,
  507. itemCount:
  508. favorieteGemeenteItem.length,
  509. itemBuilder: (context,
  510. favorieteGemeenteItemIndex) {
  511. final favorieteGemeenteItemItem =
  512. favorieteGemeenteItem[
  513. favorieteGemeenteItemIndex];
  514. return InkWell(
  515. splashColor: Colors.transparent,
  516. focusColor: Colors.transparent,
  517. hoverColor: Colors.transparent,
  518. highlightColor:
  519. Colors.transparent,
  520. onTap: () async {
  521. FFAppState().gemeenteSelectId =
  522. getJsonField(
  523. favorieteGemeenteItemItem,
  524. r'''$.nid''',
  525. ).toString();
  526. FFAppState()
  527. .gemeenteSelectNaam =
  528. getJsonField(
  529. favorieteGemeenteItemItem,
  530. r'''$.titel''',
  531. ).toString();
  532. FFAppState().provincieSelectId =
  533. getJsonField(
  534. favorieteGemeenteItemItem,
  535. r'''$.parent_nid''',
  536. ).toString();
  537. FFAppState()
  538. .provincieSelectName =
  539. getJsonField(
  540. favorieteGemeenteItemItem,
  541. r'''$.parent_titel''',
  542. ).toString();
  543. safeSetState(() {});
  544. context.pushNamed(
  545. HomeWidget.routeName);
  546. },
  547. child: Material(
  548. color: Colors.transparent,
  549. child: ListTile(
  550. title: Text(
  551. getJsonField(
  552. favorieteGemeenteItemItem,
  553. r'''$.titel''',
  554. ).toString(),
  555. style: FlutterFlowTheme.of(
  556. context)
  557. .titleLarge
  558. .override(
  559. font: GoogleFonts
  560. .roboto(
  561. fontWeight:
  562. FlutterFlowTheme.of(
  563. context)
  564. .titleLarge
  565. .fontWeight,
  566. fontStyle:
  567. FlutterFlowTheme.of(
  568. context)
  569. .titleLarge
  570. .fontStyle,
  571. ),
  572. letterSpacing: 0.0,
  573. fontWeight:
  574. FlutterFlowTheme.of(
  575. context)
  576. .titleLarge
  577. .fontWeight,
  578. fontStyle:
  579. FlutterFlowTheme.of(
  580. context)
  581. .titleLarge
  582. .fontStyle,
  583. ),
  584. ),
  585. subtitle: Text(
  586. FFLocalizations.of(context)
  587. .getText(
  588. 'jm4s7cdn' /* Stel in als standaard */,
  589. ),
  590. style: FlutterFlowTheme.of(
  591. context)
  592. .labelMedium
  593. .override(
  594. font: GoogleFonts
  595. .roboto(
  596. fontWeight:
  597. FlutterFlowTheme.of(
  598. context)
  599. .labelMedium
  600. .fontWeight,
  601. fontStyle:
  602. FlutterFlowTheme.of(
  603. context)
  604. .labelMedium
  605. .fontStyle,
  606. ),
  607. letterSpacing: 0.0,
  608. fontWeight:
  609. FlutterFlowTheme.of(
  610. context)
  611. .labelMedium
  612. .fontWeight,
  613. fontStyle:
  614. FlutterFlowTheme.of(
  615. context)
  616. .labelMedium
  617. .fontStyle,
  618. ),
  619. ),
  620. trailing: Icon(
  621. Icons
  622. .arrow_forward_ios_rounded,
  623. color: FlutterFlowTheme.of(
  624. context)
  625. .secondaryText,
  626. size: 24.0,
  627. ),
  628. tileColor:
  629. FlutterFlowTheme.of(
  630. context)
  631. .secondaryBackground,
  632. dense: false,
  633. contentPadding:
  634. EdgeInsetsDirectional
  635. .fromSTEB(12.0, 0.0,
  636. 12.0, 0.0),
  637. shape: RoundedRectangleBorder(
  638. borderRadius:
  639. BorderRadius.circular(
  640. 8.0),
  641. ),
  642. ),
  643. ),
  644. );
  645. },
  646. );
  647. },
  648. ),
  649. ],
  650. ),
  651. ),
  652. Padding(
  653. padding: EdgeInsets.all(16.0),
  654. child: InkWell(
  655. splashColor: Colors.transparent,
  656. focusColor: Colors.transparent,
  657. hoverColor: Colors.transparent,
  658. highlightColor: Colors.transparent,
  659. onTap: () async {
  660. context.pushNamed(
  661. MijnProfielWidget.routeName,
  662. queryParameters: {
  663. 'tabIndex': serializeParam(
  664. 3,
  665. ParamType.int,
  666. ),
  667. }.withoutNulls,
  668. );
  669. },
  670. child: Text(
  671. FFLocalizations.of(context).getText(
  672. '4j5eydc4' /* Wil je elke week de uitgaansag... */,
  673. ),
  674. style: FlutterFlowTheme.of(context)
  675. .bodyMedium
  676. .override(
  677. font: GoogleFonts.roboto(
  678. fontWeight:
  679. FlutterFlowTheme.of(context)
  680. .bodyMedium
  681. .fontWeight,
  682. fontStyle:
  683. FlutterFlowTheme.of(context)
  684. .bodyMedium
  685. .fontStyle,
  686. ),
  687. color: FlutterFlowTheme.of(context)
  688. .secondary,
  689. letterSpacing: 0.0,
  690. fontWeight:
  691. FlutterFlowTheme.of(context)
  692. .bodyMedium
  693. .fontWeight,
  694. fontStyle:
  695. FlutterFlowTheme.of(context)
  696. .bodyMedium
  697. .fontStyle,
  698. ),
  699. ),
  700. ),
  701. ),
  702. ],
  703. ),
  704. Column(
  705. mainAxisSize: MainAxisSize.max,
  706. children: [
  707. Expanded(
  708. child: Builder(
  709. builder: (context) {
  710. final favorieteHorecagelegenheid = _model
  711. .favorieteHorecagelegenheden
  712. .toList();
  713. if (favorieteHorecagelegenheid.isEmpty) {
  714. return LegeLijstMeldingWidget(
  715. nlTekst:
  716. 'Je hebt nog geen favoriete gelegenheden. Tik op het hartje bij een zaak om hem hier te bewaren.',
  717. enTekst:
  718. 'You have no favourite venues yet. Tap the heart on a venue to save it here.',
  719. );
  720. }
  721. _model.debugGeneratorVariables[
  722. 'favorieteHorecagelegenheid${favorieteHorecagelegenheid.length > 100 ? ' (first 100)' : ''}'] =
  723. debugSerializeParam(
  724. favorieteHorecagelegenheid.take(100),
  725. ParamType.JSON,
  726. isList: true,
  727. link:
  728. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=favorieten',
  729. name: 'dynamic',
  730. nullable: false,
  731. );
  732. debugLogWidgetClass(_model);
  733. return MasonryGridView.builder(
  734. gridDelegate:
  735. SliverSimpleGridDelegateWithFixedCrossAxisCount(
  736. crossAxisCount: () {
  737. if (MediaQuery.sizeOf(context).width <
  738. kBreakpointSmall) {
  739. return 1;
  740. } else if (MediaQuery.sizeOf(context)
  741. .width <
  742. kBreakpointMedium) {
  743. return 1;
  744. } else if (MediaQuery.sizeOf(context)
  745. .width <
  746. kBreakpointLarge) {
  747. return 2;
  748. } else {
  749. return 3;
  750. }
  751. }(),
  752. ),
  753. crossAxisSpacing: 10.0,
  754. mainAxisSpacing: 10.0,
  755. itemCount:
  756. favorieteHorecagelegenheid.length,
  757. itemBuilder: (context,
  758. favorieteHorecagelegenheidIndex) {
  759. final favorieteHorecagelegenheidItem =
  760. favorieteHorecagelegenheid[
  761. favorieteHorecagelegenheidIndex];
  762. return InkWell(
  763. splashColor: Colors.transparent,
  764. focusColor: Colors.transparent,
  765. hoverColor: Colors.transparent,
  766. highlightColor: Colors.transparent,
  767. onTap: () async {
  768. context.pushNamed(
  769. HorecagelegenheidCurrentWidget
  770. .routeName,
  771. queryParameters: {
  772. 'nid': serializeParam(
  773. getJsonField(
  774. favorieteHorecagelegenheidItem,
  775. r'''$.nid''',
  776. ).toString(),
  777. ParamType.String,
  778. ),
  779. }.withoutNulls,
  780. );
  781. },
  782. child: Builder(builder: (_) {
  783. return DebugFlutterFlowModelContext(
  784. rootModel: _model.rootModel,
  785. parentModelCallback: (m) {
  786. _model.horecagelegenheidoverzichtKaartModels[
  787. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'] = m;
  788. },
  789. child:
  790. HorecagelegenheidoverzichtKaartWidget(
  791. key: Key(
  792. 'Keycet_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'),
  793. titel: getJsonField(
  794. favorieteHorecagelegenheidItem,
  795. r'''$.titel''',
  796. ).toString(),
  797. logo: getJsonField(
  798. favorieteHorecagelegenheidItem,
  799. r'''$.logo''',
  800. ).toString(),
  801. nid: getJsonField(
  802. favorieteHorecagelegenheidItem,
  803. r'''$.nid''',
  804. ).toString(),
  805. adres: getJsonField(
  806. favorieteHorecagelegenheidItem,
  807. r'''$.adres''',
  808. ).toString(),
  809. plaats: getJsonField(
  810. favorieteHorecagelegenheidItem,
  811. r'''$.plaats''',
  812. ).toString(),
  813. categorie: (getJsonField(
  814. favorieteHorecagelegenheidItem,
  815. r'''$.categorie''',
  816. true,
  817. ) as List?)
  818. ?.map<String>(
  819. (e) => e.toString())
  820. .toList()
  821. .cast<String>(),
  822. ),
  823. );
  824. }),
  825. );
  826. },
  827. );
  828. },
  829. ),
  830. ),
  831. ],
  832. ),
  833. Column(
  834. mainAxisSize: MainAxisSize.max,
  835. children: [
  836. if (FFAppState().userSessionid != null &&
  837. FFAppState().userSessionid != '')
  838. Column(
  839. mainAxisSize: MainAxisSize.max,
  840. children: [
  841. InkWell(
  842. splashColor: Colors.transparent,
  843. focusColor: Colors.transparent,
  844. hoverColor: Colors.transparent,
  845. highlightColor: Colors.transparent,
  846. onTap: () async {
  847. FFAppState().deleteUserToken();
  848. FFAppState().userToken = '';
  849. FFAppState().deleteUserSessionid();
  850. FFAppState().userSessionid = '';
  851. FFAppState().deleteUserSessionname();
  852. FFAppState().userSessionname = '';
  853. FFAppState().deleteUserName();
  854. FFAppState().userName = '';
  855. FFAppState().deleteUserUid();
  856. FFAppState().userUid = 0;
  857. FFAppState().deleteUserMail();
  858. FFAppState().userMail = '';
  859. safeSetState(() {});
  860. context.goNamed(LoginWidget.routeName);
  861. },
  862. child: Material(
  863. color: Colors.transparent,
  864. child: ListTile(
  865. title: Text(
  866. FFLocalizations.of(context).getText(
  867. 'wl9hk4vl' /* Uitloggen */,
  868. ),
  869. style: FlutterFlowTheme.of(context)
  870. .titleLarge
  871. .override(
  872. font: GoogleFonts.roboto(
  873. fontWeight:
  874. FlutterFlowTheme.of(
  875. context)
  876. .titleLarge
  877. .fontWeight,
  878. fontStyle:
  879. FlutterFlowTheme.of(
  880. context)
  881. .titleLarge
  882. .fontStyle,
  883. ),
  884. letterSpacing: 0.0,
  885. fontWeight:
  886. FlutterFlowTheme.of(
  887. context)
  888. .titleLarge
  889. .fontWeight,
  890. fontStyle:
  891. FlutterFlowTheme.of(
  892. 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:
  904. FlutterFlowTheme.of(context)
  905. .secondaryBackground,
  906. dense: false,
  907. contentPadding:
  908. EdgeInsetsDirectional.fromSTEB(
  909. 12.0, 0.0, 12.0, 0.0),
  910. shape: RoundedRectangleBorder(
  911. borderRadius:
  912. BorderRadius.circular(8.0),
  913. ),
  914. ),
  915. ),
  916. ),
  917. InkWell(
  918. splashColor: Colors.transparent,
  919. focusColor: Colors.transparent,
  920. hoverColor: Colors.transparent,
  921. highlightColor: Colors.transparent,
  922. onTap: () async {
  923. context.pushNamed(
  924. MijnProfielWidget.routeName);
  925. },
  926. child: Material(
  927. color: Colors.transparent,
  928. child: ListTile(
  929. title: Text(
  930. FFLocalizations.of(context).getText(
  931. 'mj6x0sxf' /* Mijn profiel */,
  932. ),
  933. style: FlutterFlowTheme.of(context)
  934. .titleLarge
  935. .override(
  936. font: GoogleFonts.roboto(
  937. fontWeight:
  938. FlutterFlowTheme.of(
  939. context)
  940. .titleLarge
  941. .fontWeight,
  942. fontStyle:
  943. FlutterFlowTheme.of(
  944. context)
  945. .titleLarge
  946. .fontStyle,
  947. ),
  948. letterSpacing: 0.0,
  949. fontWeight:
  950. FlutterFlowTheme.of(
  951. context)
  952. .titleLarge
  953. .fontWeight,
  954. fontStyle:
  955. FlutterFlowTheme.of(
  956. context)
  957. .titleLarge
  958. .fontStyle,
  959. ),
  960. ),
  961. trailing: Icon(
  962. Icons.arrow_forward_ios_rounded,
  963. color: FlutterFlowTheme.of(context)
  964. .secondaryText,
  965. size: 24.0,
  966. ),
  967. tileColor:
  968. FlutterFlowTheme.of(context)
  969. .secondaryBackground,
  970. dense: false,
  971. contentPadding:
  972. EdgeInsetsDirectional.fromSTEB(
  973. 12.0, 0.0, 12.0, 0.0),
  974. shape: RoundedRectangleBorder(
  975. borderRadius:
  976. BorderRadius.circular(8.0),
  977. ),
  978. ),
  979. ),
  980. ),
  981. InkWell(
  982. splashColor: Colors.transparent,
  983. focusColor: Colors.transparent,
  984. hoverColor: Colors.transparent,
  985. highlightColor: Colors.transparent,
  986. onTap: () async {
  987. context.pushNamed(
  988. WachtwoordVergetenWidget.routeName);
  989. },
  990. child: Material(
  991. color: Colors.transparent,
  992. child: ListTile(
  993. title: Text(
  994. FFLocalizations.of(context).getText(
  995. 'wxlmmqen' /* Wachtwoord wijzigen */,
  996. ),
  997. style: FlutterFlowTheme.of(context)
  998. .titleLarge
  999. .override(
  1000. font: GoogleFonts.roboto(
  1001. fontWeight:
  1002. FlutterFlowTheme.of(
  1003. context)
  1004. .titleLarge
  1005. .fontWeight,
  1006. fontStyle:
  1007. FlutterFlowTheme.of(
  1008. context)
  1009. .titleLarge
  1010. .fontStyle,
  1011. ),
  1012. letterSpacing: 0.0,
  1013. fontWeight:
  1014. FlutterFlowTheme.of(
  1015. context)
  1016. .titleLarge
  1017. .fontWeight,
  1018. fontStyle:
  1019. FlutterFlowTheme.of(
  1020. context)
  1021. .titleLarge
  1022. .fontStyle,
  1023. ),
  1024. ),
  1025. trailing: Icon(
  1026. Icons.arrow_forward_ios_rounded,
  1027. color: FlutterFlowTheme.of(context)
  1028. .secondaryText,
  1029. size: 24.0,
  1030. ),
  1031. tileColor:
  1032. FlutterFlowTheme.of(context)
  1033. .secondaryBackground,
  1034. dense: false,
  1035. contentPadding:
  1036. EdgeInsetsDirectional.fromSTEB(
  1037. 12.0, 0.0, 12.0, 0.0),
  1038. shape: RoundedRectangleBorder(
  1039. borderRadius:
  1040. BorderRadius.circular(8.0),
  1041. ),
  1042. ),
  1043. ),
  1044. ),
  1045. InkWell(
  1046. splashColor: Colors.transparent,
  1047. focusColor: Colors.transparent,
  1048. hoverColor: Colors.transparent,
  1049. highlightColor: Colors.transparent,
  1050. onTap: () async {
  1051. unawaited(
  1052. () async {
  1053. await launchURL(
  1054. 'https://uitgaanskrant.com/nl/support/mobieleapp');
  1055. }(),
  1056. );
  1057. },
  1058. child: Material(
  1059. color: Colors.transparent,
  1060. child: ListTile(
  1061. title: Text(
  1062. FFLocalizations.of(context).getText(
  1063. 'lwnfr9gv' /* Account verwijderen */,
  1064. ),
  1065. style: FlutterFlowTheme.of(context)
  1066. .titleLarge
  1067. .override(
  1068. font: GoogleFonts.roboto(
  1069. fontWeight:
  1070. FlutterFlowTheme.of(
  1071. context)
  1072. .titleLarge
  1073. .fontWeight,
  1074. fontStyle:
  1075. FlutterFlowTheme.of(
  1076. context)
  1077. .titleLarge
  1078. .fontStyle,
  1079. ),
  1080. letterSpacing: 0.0,
  1081. fontWeight:
  1082. FlutterFlowTheme.of(
  1083. context)
  1084. .titleLarge
  1085. .fontWeight,
  1086. fontStyle:
  1087. FlutterFlowTheme.of(
  1088. context)
  1089. .titleLarge
  1090. .fontStyle,
  1091. ),
  1092. ),
  1093. trailing: Icon(
  1094. Icons.arrow_forward_ios_rounded,
  1095. color: FlutterFlowTheme.of(context)
  1096. .secondaryText,
  1097. size: 24.0,
  1098. ),
  1099. tileColor:
  1100. FlutterFlowTheme.of(context)
  1101. .secondaryBackground,
  1102. dense: false,
  1103. contentPadding:
  1104. EdgeInsetsDirectional.fromSTEB(
  1105. 12.0, 0.0, 12.0, 0.0),
  1106. shape: RoundedRectangleBorder(
  1107. borderRadius:
  1108. BorderRadius.circular(8.0),
  1109. ),
  1110. ),
  1111. ),
  1112. ),
  1113. FFButtonWidget(
  1114. onPressed: () async {
  1115. FFAppState().kloonBron = null;
  1116. safeSetState(() {});
  1117. context.pushNamed(
  1118. StadsactiviteitAanmakenWidget
  1119. .routeName);
  1120. },
  1121. text: FFLocalizations.of(context).getText(
  1122. 'xglkp3tc' /* Stadsactiviteit aanmaken */,
  1123. ),
  1124. options: FFButtonOptions(
  1125. height: 40.0,
  1126. padding: EdgeInsetsDirectional.fromSTEB(
  1127. 16.0, 0.0, 16.0, 0.0),
  1128. iconPadding:
  1129. EdgeInsetsDirectional.fromSTEB(
  1130. 0.0, 0.0, 0.0, 0.0),
  1131. color: FlutterFlowTheme.of(context)
  1132. .secondary,
  1133. textStyle: FlutterFlowTheme.of(context)
  1134. .titleSmall
  1135. .override(
  1136. font: GoogleFonts.roboto(
  1137. fontWeight:
  1138. FlutterFlowTheme.of(context)
  1139. .titleSmall
  1140. .fontWeight,
  1141. fontStyle:
  1142. FlutterFlowTheme.of(context)
  1143. .titleSmall
  1144. .fontStyle,
  1145. ),
  1146. color: Colors.white,
  1147. letterSpacing: 0.0,
  1148. fontWeight:
  1149. FlutterFlowTheme.of(context)
  1150. .titleSmall
  1151. .fontWeight,
  1152. fontStyle:
  1153. FlutterFlowTheme.of(context)
  1154. .titleSmall
  1155. .fontStyle,
  1156. ),
  1157. elevation: 0.0,
  1158. borderRadius:
  1159. BorderRadius.circular(8.0),
  1160. ),
  1161. ),
  1162. Text(
  1163. valueOrDefault<String>(
  1164. functions.buildStempel(),
  1165. 'buildStempel',
  1166. ),
  1167. style: FlutterFlowTheme.of(context)
  1168. .bodyMedium
  1169. .override(
  1170. font: GoogleFonts.roboto(
  1171. fontWeight:
  1172. FlutterFlowTheme.of(context)
  1173. .bodyMedium
  1174. .fontWeight,
  1175. fontStyle:
  1176. FlutterFlowTheme.of(context)
  1177. .bodyMedium
  1178. .fontStyle,
  1179. ),
  1180. letterSpacing: 0.0,
  1181. fontWeight:
  1182. FlutterFlowTheme.of(context)
  1183. .bodyMedium
  1184. .fontWeight,
  1185. fontStyle:
  1186. FlutterFlowTheme.of(context)
  1187. .bodyMedium
  1188. .fontStyle,
  1189. ),
  1190. ),
  1191. ],
  1192. ),
  1193. if (FFAppState().userSessionid == null ||
  1194. FFAppState().userSessionid == '')
  1195. Padding(
  1196. padding: EdgeInsetsDirectional.fromSTEB(
  1197. 16.0, 0.0, 16.0, 0.0),
  1198. child: Column(
  1199. mainAxisSize: MainAxisSize.max,
  1200. children: [
  1201. Text(
  1202. FFLocalizations.of(context).getText(
  1203. 'zxbjvxzq' /* Met een account bewaar je favo... */,
  1204. ),
  1205. style: FlutterFlowTheme.of(context)
  1206. .bodyMedium
  1207. .override(
  1208. font: GoogleFonts.roboto(
  1209. fontWeight:
  1210. FlutterFlowTheme.of(context)
  1211. .bodyMedium
  1212. .fontWeight,
  1213. fontStyle:
  1214. FlutterFlowTheme.of(context)
  1215. .bodyMedium
  1216. .fontStyle,
  1217. ),
  1218. letterSpacing: 0.0,
  1219. fontWeight:
  1220. FlutterFlowTheme.of(context)
  1221. .bodyMedium
  1222. .fontWeight,
  1223. fontStyle:
  1224. FlutterFlowTheme.of(context)
  1225. .bodyMedium
  1226. .fontStyle,
  1227. ),
  1228. ),
  1229. FFButtonWidget(
  1230. onPressed: () async {
  1231. await launchURL(
  1232. 'https://uitgaanskrant.com/nl/user/register');
  1233. },
  1234. text:
  1235. FFLocalizations.of(context).getText(
  1236. '1xim8yie' /* Account aanmaken */,
  1237. ),
  1238. options: FFButtonOptions(
  1239. height: 40.0,
  1240. padding:
  1241. EdgeInsetsDirectional.fromSTEB(
  1242. 16.0, 0.0, 16.0, 0.0),
  1243. iconPadding:
  1244. EdgeInsetsDirectional.fromSTEB(
  1245. 0.0, 0.0, 0.0, 0.0),
  1246. color: FlutterFlowTheme.of(context)
  1247. .secondary,
  1248. textStyle: FlutterFlowTheme.of(
  1249. context)
  1250. .titleSmall
  1251. .override(
  1252. font: GoogleFonts.roboto(
  1253. fontWeight:
  1254. FlutterFlowTheme.of(
  1255. context)
  1256. .titleSmall
  1257. .fontWeight,
  1258. fontStyle:
  1259. FlutterFlowTheme.of(
  1260. context)
  1261. .titleSmall
  1262. .fontStyle,
  1263. ),
  1264. color: Colors.white,
  1265. letterSpacing: 0.0,
  1266. fontWeight:
  1267. FlutterFlowTheme.of(context)
  1268. .titleSmall
  1269. .fontWeight,
  1270. fontStyle:
  1271. FlutterFlowTheme.of(context)
  1272. .titleSmall
  1273. .fontStyle,
  1274. ),
  1275. elevation: 0.0,
  1276. borderRadius:
  1277. BorderRadius.circular(8.0),
  1278. ),
  1279. ),
  1280. FFButtonWidget(
  1281. onPressed: () async {
  1282. context
  1283. .pushNamed(LoginWidget.routeName);
  1284. },
  1285. text:
  1286. FFLocalizations.of(context).getText(
  1287. 'svydwydi' /* Inloggen */,
  1288. ),
  1289. options: FFButtonOptions(
  1290. height: 40.0,
  1291. padding:
  1292. EdgeInsetsDirectional.fromSTEB(
  1293. 16.0, 0.0, 16.0, 0.0),
  1294. iconPadding:
  1295. EdgeInsetsDirectional.fromSTEB(
  1296. 0.0, 0.0, 0.0, 0.0),
  1297. color: FlutterFlowTheme.of(context)
  1298. .primaryBackground,
  1299. textStyle: FlutterFlowTheme.of(
  1300. context)
  1301. .titleSmall
  1302. .override(
  1303. font: GoogleFonts.roboto(
  1304. fontWeight:
  1305. FlutterFlowTheme.of(
  1306. context)
  1307. .titleSmall
  1308. .fontWeight,
  1309. fontStyle:
  1310. FlutterFlowTheme.of(
  1311. context)
  1312. .titleSmall
  1313. .fontStyle,
  1314. ),
  1315. color:
  1316. FlutterFlowTheme.of(context)
  1317. .secondary,
  1318. letterSpacing: 0.0,
  1319. fontWeight:
  1320. FlutterFlowTheme.of(context)
  1321. .titleSmall
  1322. .fontWeight,
  1323. fontStyle:
  1324. FlutterFlowTheme.of(context)
  1325. .titleSmall
  1326. .fontStyle,
  1327. ),
  1328. elevation: 0.0,
  1329. borderRadius:
  1330. BorderRadius.circular(8.0),
  1331. ),
  1332. ),
  1333. ],
  1334. ),
  1335. ),
  1336. ],
  1337. ),
  1338. ],
  1339. ),
  1340. ),
  1341. ],
  1342. ),
  1343. ),
  1344. ],
  1345. ),
  1346. ),
  1347. ),
  1348. );
  1349. }
  1350. }