favorieten_copy_widget.dart 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104
  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_copy_model.dart';
  20. export 'favorieten_copy_model.dart';
  21. class FavorietenCopyWidget extends StatefulWidget {
  22. const FavorietenCopyWidget({super.key});
  23. static String routeName = 'favorietenCopy';
  24. static String routePath = '/favorietenCopy';
  25. @override
  26. State<FavorietenCopyWidget> createState() => _FavorietenCopyWidgetState();
  27. }
  28. class _FavorietenCopyWidgetState extends State<FavorietenCopyWidget>
  29. with TickerProviderStateMixin, RouteAware {
  30. late FavorietenCopyModel _model;
  31. final scaffoldKey = GlobalKey<ScaffoldState>();
  32. @override
  33. void initState() {
  34. super.initState();
  35. _model = createModel(context, () => FavorietenCopyModel());
  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(FavorietenCopyWidget 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. 'drcvvj08' /* Persoonlijke agenda */,
  213. ),
  214. ),
  215. Tab(
  216. text: FFLocalizations.of(context).getText(
  217. 'un9637l7' /* Favoriete gemeenten */,
  218. ),
  219. ),
  220. Tab(
  221. text: FFLocalizations.of(context).getText(
  222. '4rncj25s' /* Favoriete Gelegenheden */,
  223. ),
  224. ),
  225. Tab(
  226. text: FFLocalizations.of(context).getText(
  227. '1ka5jbik' /* 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=favorietenCopy',
  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. 'Keyn9j_${favorietenAgendaItemsIndex}_of_${favorietenAgendaItems.length}'] = m;
  348. },
  349. child: UitgaantabelKaartWidget(
  350. key: Key(
  351. 'Keyn9j_${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. 'kvn4awgt' /* 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=favorietenCopy',
  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. 'hofv571k' /* 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=favorietenCopy',
  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. 'Keyl7p_${favorieteHorecagelegenheidIndex}_of_${favorieteHorecagelegenheid.length}'] = m;
  681. },
  682. child:
  683. HorecagelegenheidoverzichtKaartWidget(
  684. key: Key(
  685. 'Keyl7p_${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. Visibility(
  727. visible: FFAppState().userSessionid != null &&
  728. FFAppState().userSessionid != '',
  729. child: Column(
  730. mainAxisSize: MainAxisSize.max,
  731. children: [
  732. InkWell(
  733. splashColor: Colors.transparent,
  734. focusColor: Colors.transparent,
  735. hoverColor: Colors.transparent,
  736. highlightColor: Colors.transparent,
  737. onTap: () async {
  738. FFAppState().deleteUserToken();
  739. FFAppState().userToken = '';
  740. FFAppState().deleteUserSessionid();
  741. FFAppState().userSessionid = '';
  742. FFAppState().deleteUserSessionname();
  743. FFAppState().userSessionname = '';
  744. FFAppState().deleteUserName();
  745. FFAppState().userName = '';
  746. FFAppState().deleteUserUid();
  747. FFAppState().userUid = 0;
  748. FFAppState().deleteUserMail();
  749. FFAppState().userMail = '';
  750. safeSetState(() {});
  751. context.goNamed(LoginWidget.routeName);
  752. },
  753. child: Material(
  754. color: Colors.transparent,
  755. child: ListTile(
  756. title: Text(
  757. FFLocalizations.of(context).getText(
  758. 'wi8eyg9u' /* Uitloggen */,
  759. ),
  760. style: FlutterFlowTheme.of(context)
  761. .titleLarge
  762. .override(
  763. font: GoogleFonts.roboto(
  764. fontWeight:
  765. FlutterFlowTheme.of(context)
  766. .titleLarge
  767. .fontWeight,
  768. fontStyle:
  769. FlutterFlowTheme.of(context)
  770. .titleLarge
  771. .fontStyle,
  772. ),
  773. letterSpacing: 0.0,
  774. fontWeight:
  775. FlutterFlowTheme.of(context)
  776. .titleLarge
  777. .fontWeight,
  778. fontStyle:
  779. FlutterFlowTheme.of(context)
  780. .titleLarge
  781. .fontStyle,
  782. ),
  783. ),
  784. trailing: Icon(
  785. Icons.arrow_forward_ios_rounded,
  786. color: FlutterFlowTheme.of(context)
  787. .secondaryText,
  788. size: 24.0,
  789. ),
  790. tileColor: FlutterFlowTheme.of(context)
  791. .secondaryBackground,
  792. dense: false,
  793. contentPadding:
  794. EdgeInsetsDirectional.fromSTEB(
  795. 12.0, 0.0, 12.0, 0.0),
  796. shape: RoundedRectangleBorder(
  797. borderRadius:
  798. BorderRadius.circular(8.0),
  799. ),
  800. ),
  801. ),
  802. ),
  803. InkWell(
  804. splashColor: Colors.transparent,
  805. focusColor: Colors.transparent,
  806. hoverColor: Colors.transparent,
  807. highlightColor: Colors.transparent,
  808. onTap: () async {
  809. context
  810. .pushNamed(MijnProfielWidget.routeName);
  811. },
  812. child: Material(
  813. color: Colors.transparent,
  814. child: ListTile(
  815. title: Text(
  816. FFLocalizations.of(context).getText(
  817. '9vh9z462' /* Mijn profiel */,
  818. ),
  819. style: FlutterFlowTheme.of(context)
  820. .titleLarge
  821. .override(
  822. font: GoogleFonts.roboto(
  823. fontWeight:
  824. FlutterFlowTheme.of(context)
  825. .titleLarge
  826. .fontWeight,
  827. fontStyle:
  828. FlutterFlowTheme.of(context)
  829. .titleLarge
  830. .fontStyle,
  831. ),
  832. letterSpacing: 0.0,
  833. fontWeight:
  834. FlutterFlowTheme.of(context)
  835. .titleLarge
  836. .fontWeight,
  837. fontStyle:
  838. FlutterFlowTheme.of(context)
  839. .titleLarge
  840. .fontStyle,
  841. ),
  842. ),
  843. trailing: Icon(
  844. Icons.arrow_forward_ios_rounded,
  845. color: FlutterFlowTheme.of(context)
  846. .secondaryText,
  847. size: 24.0,
  848. ),
  849. tileColor: FlutterFlowTheme.of(context)
  850. .secondaryBackground,
  851. dense: false,
  852. contentPadding:
  853. EdgeInsetsDirectional.fromSTEB(
  854. 12.0, 0.0, 12.0, 0.0),
  855. shape: RoundedRectangleBorder(
  856. borderRadius:
  857. BorderRadius.circular(8.0),
  858. ),
  859. ),
  860. ),
  861. ),
  862. InkWell(
  863. splashColor: Colors.transparent,
  864. focusColor: Colors.transparent,
  865. hoverColor: Colors.transparent,
  866. highlightColor: Colors.transparent,
  867. onTap: () async {
  868. context.pushNamed(
  869. WachtwoordVergetenWidget.routeName);
  870. },
  871. child: Material(
  872. color: Colors.transparent,
  873. child: ListTile(
  874. title: Text(
  875. FFLocalizations.of(context).getText(
  876. '3gz8082f' /* Wachtwoord wijzigen */,
  877. ),
  878. style: FlutterFlowTheme.of(context)
  879. .titleLarge
  880. .override(
  881. font: GoogleFonts.roboto(
  882. fontWeight:
  883. FlutterFlowTheme.of(context)
  884. .titleLarge
  885. .fontWeight,
  886. fontStyle:
  887. FlutterFlowTheme.of(context)
  888. .titleLarge
  889. .fontStyle,
  890. ),
  891. letterSpacing: 0.0,
  892. fontWeight:
  893. FlutterFlowTheme.of(context)
  894. .titleLarge
  895. .fontWeight,
  896. fontStyle:
  897. FlutterFlowTheme.of(context)
  898. .titleLarge
  899. .fontStyle,
  900. ),
  901. ),
  902. trailing: Icon(
  903. Icons.arrow_forward_ios_rounded,
  904. color: FlutterFlowTheme.of(context)
  905. .secondaryText,
  906. size: 24.0,
  907. ),
  908. tileColor: FlutterFlowTheme.of(context)
  909. .secondaryBackground,
  910. dense: false,
  911. contentPadding:
  912. EdgeInsetsDirectional.fromSTEB(
  913. 12.0, 0.0, 12.0, 0.0),
  914. shape: RoundedRectangleBorder(
  915. borderRadius:
  916. BorderRadius.circular(8.0),
  917. ),
  918. ),
  919. ),
  920. ),
  921. InkWell(
  922. splashColor: Colors.transparent,
  923. focusColor: Colors.transparent,
  924. hoverColor: Colors.transparent,
  925. highlightColor: Colors.transparent,
  926. onTap: () async {
  927. unawaited(
  928. () async {
  929. await launchURL(
  930. 'https://uitgaanskrant.com/nl/account-verwijderen');
  931. }(),
  932. );
  933. },
  934. child: Material(
  935. color: Colors.transparent,
  936. child: ListTile(
  937. title: Text(
  938. FFLocalizations.of(context).getText(
  939. '99u1e30s' /* Account verwijderen */,
  940. ),
  941. style: FlutterFlowTheme.of(context)
  942. .titleLarge
  943. .override(
  944. font: GoogleFonts.roboto(
  945. fontWeight:
  946. FlutterFlowTheme.of(context)
  947. .titleLarge
  948. .fontWeight,
  949. fontStyle:
  950. FlutterFlowTheme.of(context)
  951. .titleLarge
  952. .fontStyle,
  953. ),
  954. letterSpacing: 0.0,
  955. fontWeight:
  956. FlutterFlowTheme.of(context)
  957. .titleLarge
  958. .fontWeight,
  959. fontStyle:
  960. FlutterFlowTheme.of(context)
  961. .titleLarge
  962. .fontStyle,
  963. ),
  964. ),
  965. trailing: Icon(
  966. Icons.arrow_forward_ios_rounded,
  967. color: FlutterFlowTheme.of(context)
  968. .secondaryText,
  969. size: 24.0,
  970. ),
  971. tileColor: FlutterFlowTheme.of(context)
  972. .secondaryBackground,
  973. dense: false,
  974. contentPadding:
  975. EdgeInsetsDirectional.fromSTEB(
  976. 12.0, 0.0, 12.0, 0.0),
  977. shape: RoundedRectangleBorder(
  978. borderRadius:
  979. BorderRadius.circular(8.0),
  980. ),
  981. ),
  982. ),
  983. ),
  984. FFButtonWidget(
  985. onPressed: () async {
  986. context.pushNamed(
  987. StadsactiviteitAanmakenWidget
  988. .routeName);
  989. },
  990. text: FFLocalizations.of(context).getText(
  991. 'omwn2yti' /* Stadsactiviteit aanmaken */,
  992. ),
  993. options: FFButtonOptions(
  994. height: 40.0,
  995. padding: EdgeInsetsDirectional.fromSTEB(
  996. 16.0, 0.0, 16.0, 0.0),
  997. iconPadding: EdgeInsetsDirectional.fromSTEB(
  998. 0.0, 0.0, 0.0, 0.0),
  999. color:
  1000. FlutterFlowTheme.of(context).secondary,
  1001. textStyle: FlutterFlowTheme.of(context)
  1002. .titleSmall
  1003. .override(
  1004. font: GoogleFonts.roboto(
  1005. fontWeight:
  1006. FlutterFlowTheme.of(context)
  1007. .titleSmall
  1008. .fontWeight,
  1009. fontStyle:
  1010. FlutterFlowTheme.of(context)
  1011. .titleSmall
  1012. .fontStyle,
  1013. ),
  1014. color: Colors.white,
  1015. letterSpacing: 0.0,
  1016. fontWeight:
  1017. FlutterFlowTheme.of(context)
  1018. .titleSmall
  1019. .fontWeight,
  1020. fontStyle:
  1021. FlutterFlowTheme.of(context)
  1022. .titleSmall
  1023. .fontStyle,
  1024. ),
  1025. elevation: 0.0,
  1026. borderRadius: BorderRadius.circular(8.0),
  1027. ),
  1028. ),
  1029. Text(
  1030. valueOrDefault<String>(
  1031. functions.buildStempel(),
  1032. 'buildStempel',
  1033. ),
  1034. style: FlutterFlowTheme.of(context)
  1035. .bodyMedium
  1036. .override(
  1037. font: GoogleFonts.roboto(
  1038. fontWeight:
  1039. FlutterFlowTheme.of(context)
  1040. .bodyMedium
  1041. .fontWeight,
  1042. fontStyle:
  1043. FlutterFlowTheme.of(context)
  1044. .bodyMedium
  1045. .fontStyle,
  1046. ),
  1047. letterSpacing: 0.0,
  1048. fontWeight: FlutterFlowTheme.of(context)
  1049. .bodyMedium
  1050. .fontWeight,
  1051. fontStyle: FlutterFlowTheme.of(context)
  1052. .bodyMedium
  1053. .fontStyle,
  1054. ),
  1055. ),
  1056. ],
  1057. ),
  1058. ),
  1059. ],
  1060. ),
  1061. ),
  1062. ],
  1063. ),
  1064. ),
  1065. ],
  1066. ),
  1067. ),
  1068. ),
  1069. );
  1070. }
  1071. }