favorieten_widget.dart 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274
  1. import '/components/header_buttons_component_widget.dart';
  2. import '/flutter_flow/flutter_flow_theme.dart';
  3. import '/flutter_flow/flutter_flow_util.dart';
  4. import '/flutter_flow/flutter_flow_widgets.dart';
  5. import '/horecagelegenhedenoverzicht/horecagelegenheidoverzicht_kaart/horecagelegenheidoverzicht_kaart_widget.dart';
  6. import '/shared/drawer_component/drawer_component_widget.dart';
  7. import '/uitgaanspaginas/uitgaantabel_kaart/uitgaantabel_kaart_widget.dart';
  8. import 'dart:async';
  9. import 'dart:ui';
  10. import '/custom_code/actions/index.dart' as actions;
  11. import '/flutter_flow/custom_functions.dart' as functions;
  12. import '/index.dart';
  13. import 'package:flutter/material.dart';
  14. import 'package:flutter/scheduler.dart';
  15. import 'package:flutter_spinkit/flutter_spinkit.dart';
  16. import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
  17. import 'package:google_fonts/google_fonts.dart';
  18. import 'package:provider/provider.dart';
  19. import 'favorieten_model.dart';
  20. export 'favorieten_model.dart';
  21. class FavorietenWidget extends StatefulWidget {
  22. const FavorietenWidget({super.key});
  23. static String routeName = 'favorieten';
  24. static String routePath = '/favorieten';
  25. @override
  26. State<FavorietenWidget> createState() => _FavorietenWidgetState();
  27. }
  28. class _FavorietenWidgetState extends State<FavorietenWidget>
  29. with TickerProviderStateMixin, RouteAware {
  30. late FavorietenModel _model;
  31. final scaffoldKey = GlobalKey<ScaffoldState>();
  32. @override
  33. void initState() {
  34. super.initState();
  35. _model = createModel(context, () => FavorietenModel());
  36. // On page load action.
  37. SchedulerBinding.instance.addPostFrameCallback((_) async {
  38. _model.responseActionDrupalRequestPageLoad = await actions.drupalRequest(
  39. 'GET',
  40. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_agenda.json',
  41. FFAppState().userSessionname,
  42. FFAppState().userSessionid,
  43. FFAppState().userToken,
  44. '',
  45. );
  46. _model.favorietenAgenda =
  47. _model.responseActionDrupalRequestPageLoad!.toList().cast<dynamic>();
  48. safeSetState(() {});
  49. });
  50. _model.tabBarController = TabController(
  51. vsync: this,
  52. length: 4,
  53. initialIndex: 0,
  54. )
  55. ..addListener(() => safeSetState(() {}))
  56. ..addListener(() {
  57. debugLogWidgetClass(_model);
  58. });
  59. }
  60. @override
  61. void dispose() {
  62. routeObserver.unsubscribe(this);
  63. _model.dispose();
  64. super.dispose();
  65. }
  66. @override
  67. void didUpdateWidget(FavorietenWidget oldWidget) {
  68. super.didUpdateWidget(oldWidget);
  69. _model.widget = widget;
  70. }
  71. @override
  72. void didChangeDependencies() {
  73. super.didChangeDependencies();
  74. final route = DebugModalRoute.of(context);
  75. if (route != null) {
  76. routeObserver.subscribe(this, route);
  77. }
  78. debugLogGlobalProperty(context);
  79. }
  80. @override
  81. void didPopNext() {
  82. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  83. setState(() => _model.isRouteVisible = true);
  84. debugLogWidgetClass(_model);
  85. }
  86. }
  87. @override
  88. void didPush() {
  89. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  90. setState(() => _model.isRouteVisible = true);
  91. debugLogWidgetClass(_model);
  92. }
  93. }
  94. @override
  95. void didPop() {
  96. _model.isRouteVisible = false;
  97. }
  98. @override
  99. void didPushNext() {
  100. _model.isRouteVisible = false;
  101. }
  102. @override
  103. Widget build(BuildContext context) {
  104. DebugFlutterFlowModelContext.maybeOf(context)
  105. ?.parentModelCallback
  106. ?.call(_model);
  107. context.watch<FFAppState>();
  108. _model.uitgaantabelKaartModels.clear();
  109. _model.horecagelegenheidoverzichtKaartModels.clear();
  110. return GestureDetector(
  111. onTap: () {
  112. FocusScope.of(context).unfocus();
  113. FocusManager.instance.primaryFocus?.unfocus();
  114. },
  115. child: Scaffold(
  116. key: scaffoldKey,
  117. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  118. drawer: Drawer(
  119. elevation: 16.0,
  120. child: wrapWithModel(
  121. model: _model.drawerComponentModel,
  122. updateCallback: () => safeSetState(() {}),
  123. child: Builder(builder: (_) {
  124. return DebugFlutterFlowModelContext(
  125. rootModel: _model.rootModel,
  126. child: DrawerComponentWidget(),
  127. );
  128. }),
  129. ),
  130. ),
  131. appBar: PreferredSize(
  132. preferredSize: Size.fromHeight(80.0),
  133. child: AppBar(
  134. backgroundColor: FlutterFlowTheme.of(context).primaryText,
  135. automaticallyImplyLeading: false,
  136. actions: [],
  137. flexibleSpace: FlexibleSpaceBar(
  138. title: wrapWithModel(
  139. model: _model.headerButtonsComponentModel,
  140. updateCallback: () => safeSetState(() {}),
  141. child: Builder(builder: (_) {
  142. return DebugFlutterFlowModelContext(
  143. rootModel: _model.rootModel,
  144. child: HeaderButtonsComponentWidget(
  145. showBackButton: false,
  146. ),
  147. );
  148. }),
  149. ),
  150. centerTitle: true,
  151. expandedTitleScale: 1.0,
  152. ),
  153. elevation: 0.0,
  154. ),
  155. ),
  156. body: SafeArea(
  157. top: true,
  158. child: Column(
  159. mainAxisSize: MainAxisSize.max,
  160. children: [
  161. Expanded(
  162. child: Column(
  163. children: [
  164. Align(
  165. alignment: Alignment(0.0, 0),
  166. child: TabBar(
  167. isScrollable: true,
  168. tabAlignment: TabAlignment.center,
  169. labelColor: FlutterFlowTheme.of(context).primaryText,
  170. unselectedLabelColor:
  171. FlutterFlowTheme.of(context).secondaryText,
  172. labelStyle:
  173. FlutterFlowTheme.of(context).titleMedium.override(
  174. font: GoogleFonts.roboto(
  175. fontWeight: FlutterFlowTheme.of(context)
  176. .titleMedium
  177. .fontWeight,
  178. fontStyle: FlutterFlowTheme.of(context)
  179. .titleMedium
  180. .fontStyle,
  181. ),
  182. letterSpacing: 0.0,
  183. fontWeight: FlutterFlowTheme.of(context)
  184. .titleMedium
  185. .fontWeight,
  186. fontStyle: FlutterFlowTheme.of(context)
  187. .titleMedium
  188. .fontStyle,
  189. ),
  190. unselectedLabelStyle:
  191. FlutterFlowTheme.of(context).titleMedium.override(
  192. font: GoogleFonts.roboto(
  193. fontWeight: FlutterFlowTheme.of(context)
  194. .titleMedium
  195. .fontWeight,
  196. fontStyle: FlutterFlowTheme.of(context)
  197. .titleMedium
  198. .fontStyle,
  199. ),
  200. letterSpacing: 0.0,
  201. fontWeight: FlutterFlowTheme.of(context)
  202. .titleMedium
  203. .fontWeight,
  204. fontStyle: FlutterFlowTheme.of(context)
  205. .titleMedium
  206. .fontStyle,
  207. ),
  208. indicatorColor: FlutterFlowTheme.of(context).secondary,
  209. tabs: [
  210. Tab(
  211. text: FFLocalizations.of(context).getText(
  212. 'txq7zl0f' /* Persoonlijke agenda */,
  213. ),
  214. ),
  215. Tab(
  216. text: FFLocalizations.of(context).getText(
  217. '9wq117bv' /* Favoriete gemeenten */,
  218. ),
  219. ),
  220. Tab(
  221. text: FFLocalizations.of(context).getText(
  222. 'ygk8aifq' /* Favoriete Gelegenheden */,
  223. ),
  224. ),
  225. Tab(
  226. text: FFLocalizations.of(context).getText(
  227. 'y9b1k3hk' /* Gebruiker */,
  228. ),
  229. ),
  230. ],
  231. controller: _model.tabBarController,
  232. onTap: (i) async {
  233. [
  234. () async {
  235. _model.responsActionDrupalRequest =
  236. await actions.drupalRequest(
  237. 'GET',
  238. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_agenda.json',
  239. FFAppState().userSessionname,
  240. FFAppState().userSessionid,
  241. FFAppState().userToken,
  242. '',
  243. );
  244. _model.favorietenAgenda = _model
  245. .responsActionDrupalRequest!
  246. .toList()
  247. .cast<dynamic>();
  248. safeSetState(() {});
  249. safeSetState(() {});
  250. },
  251. () async {
  252. _model.resultFavorietegemeenten =
  253. await actions.drupalRequest(
  254. 'GET',
  255. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_gemeenten.json',
  256. FFAppState().userSessionname,
  257. FFAppState().userSessionid,
  258. FFAppState().userToken,
  259. '',
  260. );
  261. _model.favorietenGemeenten = _model
  262. .resultFavorietegemeenten!
  263. .toList()
  264. .cast<dynamic>();
  265. safeSetState(() {});
  266. safeSetState(() {});
  267. },
  268. () async {
  269. _model.responseFavorieteHoreca =
  270. await actions.drupalRequest(
  271. 'GET',
  272. 'https://uitgaanskrant.com/nl/flutterdrup/favorieten_horeca.json',
  273. FFAppState().userSessionname,
  274. FFAppState().userSessionid,
  275. FFAppState().userToken,
  276. '',
  277. );
  278. _model.favorieteHorecagelegenheden = _model
  279. .responseFavorieteHoreca!
  280. .toList()
  281. .cast<dynamic>();
  282. safeSetState(() {});
  283. safeSetState(() {});
  284. },
  285. () async {}
  286. ][i]();
  287. },
  288. ),
  289. ),
  290. Expanded(
  291. child: TabBarView(
  292. controller: _model.tabBarController,
  293. children: [
  294. Column(
  295. mainAxisSize: MainAxisSize.max,
  296. children: [
  297. 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. 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. 'wl9hk4vl' /* 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. 'mj6x0sxf' /* 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. 'wxlmmqen' /* 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. 'lwnfr9gv' /* 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. 'xglkp3tc' /* 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. Padding(
  1087. padding: EdgeInsetsDirectional.fromSTEB(
  1088. 16.0, 0.0, 16.0, 0.0),
  1089. child: Column(
  1090. mainAxisSize: MainAxisSize.max,
  1091. children: [
  1092. Text(
  1093. FFLocalizations.of(context).getText(
  1094. 'zxbjvxzq' /* Met een account bewaar je favo... */,
  1095. ),
  1096. style: FlutterFlowTheme.of(context)
  1097. .bodyMedium
  1098. .override(
  1099. font: GoogleFonts.roboto(
  1100. fontWeight:
  1101. FlutterFlowTheme.of(context)
  1102. .bodyMedium
  1103. .fontWeight,
  1104. fontStyle:
  1105. FlutterFlowTheme.of(context)
  1106. .bodyMedium
  1107. .fontStyle,
  1108. ),
  1109. letterSpacing: 0.0,
  1110. fontWeight:
  1111. FlutterFlowTheme.of(context)
  1112. .bodyMedium
  1113. .fontWeight,
  1114. fontStyle:
  1115. FlutterFlowTheme.of(context)
  1116. .bodyMedium
  1117. .fontStyle,
  1118. ),
  1119. ),
  1120. FFButtonWidget(
  1121. onPressed: () async {
  1122. await launchURL(
  1123. 'https://uitgaanskrant.com/nl/user/register');
  1124. },
  1125. text:
  1126. FFLocalizations.of(context).getText(
  1127. '1xim8yie' /* Account aanmaken */,
  1128. ),
  1129. options: FFButtonOptions(
  1130. height: 40.0,
  1131. padding:
  1132. EdgeInsetsDirectional.fromSTEB(
  1133. 16.0, 0.0, 16.0, 0.0),
  1134. iconPadding:
  1135. EdgeInsetsDirectional.fromSTEB(
  1136. 0.0, 0.0, 0.0, 0.0),
  1137. color: FlutterFlowTheme.of(context)
  1138. .secondary,
  1139. textStyle: FlutterFlowTheme.of(
  1140. context)
  1141. .titleSmall
  1142. .override(
  1143. font: GoogleFonts.roboto(
  1144. fontWeight:
  1145. FlutterFlowTheme.of(
  1146. context)
  1147. .titleSmall
  1148. .fontWeight,
  1149. fontStyle:
  1150. FlutterFlowTheme.of(
  1151. context)
  1152. .titleSmall
  1153. .fontStyle,
  1154. ),
  1155. color: Colors.white,
  1156. letterSpacing: 0.0,
  1157. fontWeight:
  1158. FlutterFlowTheme.of(context)
  1159. .titleSmall
  1160. .fontWeight,
  1161. fontStyle:
  1162. FlutterFlowTheme.of(context)
  1163. .titleSmall
  1164. .fontStyle,
  1165. ),
  1166. elevation: 0.0,
  1167. borderRadius:
  1168. BorderRadius.circular(8.0),
  1169. ),
  1170. ),
  1171. FFButtonWidget(
  1172. onPressed: () async {
  1173. context
  1174. .pushNamed(LoginWidget.routeName);
  1175. },
  1176. text:
  1177. FFLocalizations.of(context).getText(
  1178. 'svydwydi' /* Inloggen */,
  1179. ),
  1180. options: FFButtonOptions(
  1181. height: 40.0,
  1182. padding:
  1183. EdgeInsetsDirectional.fromSTEB(
  1184. 16.0, 0.0, 16.0, 0.0),
  1185. iconPadding:
  1186. EdgeInsetsDirectional.fromSTEB(
  1187. 0.0, 0.0, 0.0, 0.0),
  1188. color: FlutterFlowTheme.of(context)
  1189. .primaryBackground,
  1190. textStyle: FlutterFlowTheme.of(
  1191. context)
  1192. .titleSmall
  1193. .override(
  1194. font: GoogleFonts.roboto(
  1195. fontWeight:
  1196. FlutterFlowTheme.of(
  1197. context)
  1198. .titleSmall
  1199. .fontWeight,
  1200. fontStyle:
  1201. FlutterFlowTheme.of(
  1202. context)
  1203. .titleSmall
  1204. .fontStyle,
  1205. ),
  1206. color:
  1207. FlutterFlowTheme.of(context)
  1208. .secondary,
  1209. letterSpacing: 0.0,
  1210. fontWeight:
  1211. FlutterFlowTheme.of(context)
  1212. .titleSmall
  1213. .fontWeight,
  1214. fontStyle:
  1215. FlutterFlowTheme.of(context)
  1216. .titleSmall
  1217. .fontStyle,
  1218. ),
  1219. elevation: 0.0,
  1220. borderRadius:
  1221. BorderRadius.circular(8.0),
  1222. ),
  1223. ),
  1224. ],
  1225. ),
  1226. ),
  1227. ],
  1228. ),
  1229. ],
  1230. ),
  1231. ),
  1232. ],
  1233. ),
  1234. ),
  1235. ],
  1236. ),
  1237. ),
  1238. ),
  1239. );
  1240. }
  1241. }