uitgaantabel_kaart_widget.dart 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591
  1. import '/flutter_flow/flutter_flow_theme.dart';
  2. import '/flutter_flow/flutter_flow_util.dart';
  3. import '/flutter_flow/flutter_flow_widgets.dart';
  4. import '/shared/tag_categorie_component/tag_categorie_component_widget.dart';
  5. import 'dart:ui';
  6. import '/index.dart';
  7. import 'package:auto_size_text/auto_size_text.dart';
  8. import 'package:cached_network_image/cached_network_image.dart';
  9. import 'package:flutter/material.dart';
  10. import 'package:flutter_blurhash/flutter_blurhash.dart';
  11. import 'package:flutter_spinkit/flutter_spinkit.dart';
  12. import 'package:google_fonts/google_fonts.dart';
  13. import 'package:octo_image/octo_image.dart';
  14. import 'package:provider/provider.dart';
  15. import 'uitgaantabel_kaart_model.dart';
  16. export 'uitgaantabel_kaart_model.dart';
  17. class UitgaantabelKaartWidget extends StatefulWidget {
  18. const UitgaantabelKaartWidget({
  19. super.key,
  20. this.logo,
  21. this.categorie,
  22. this.titel,
  23. this.horecagelegenheid,
  24. this.adres,
  25. this.plaats,
  26. this.datum,
  27. this.inhoud,
  28. this.nid,
  29. this.horecagelegenheidNid,
  30. });
  31. final dynamic logo;
  32. final dynamic categorie;
  33. final dynamic titel;
  34. final dynamic horecagelegenheid;
  35. final dynamic adres;
  36. final dynamic plaats;
  37. final dynamic datum;
  38. final dynamic inhoud;
  39. final dynamic nid;
  40. final dynamic horecagelegenheidNid;
  41. @override
  42. State<UitgaantabelKaartWidget> createState() =>
  43. _UitgaantabelKaartWidgetState();
  44. }
  45. class _UitgaantabelKaartWidgetState extends State<UitgaantabelKaartWidget>
  46. with RouteAware {
  47. late UitgaantabelKaartModel _model;
  48. @override
  49. void setState(VoidCallback callback) {
  50. super.setState(callback);
  51. _model.onUpdate();
  52. }
  53. @override
  54. void initState() {
  55. super.initState();
  56. _model = createModel(context, () => UitgaantabelKaartModel());
  57. }
  58. @override
  59. void dispose() {
  60. routeObserver.unsubscribe(this);
  61. _model.maybeDispose();
  62. super.dispose();
  63. }
  64. @override
  65. void didUpdateWidget(UitgaantabelKaartWidget oldWidget) {
  66. super.didUpdateWidget(oldWidget);
  67. _model.widget = widget;
  68. }
  69. @override
  70. void didChangeDependencies() {
  71. super.didChangeDependencies();
  72. final route = DebugModalRoute.of(context);
  73. if (route != null) {
  74. routeObserver.subscribe(this, route);
  75. }
  76. debugLogGlobalProperty(context);
  77. }
  78. @override
  79. void didPopNext() {
  80. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  81. setState(() => _model.isRouteVisible = true);
  82. debugLogWidgetClass(_model);
  83. }
  84. }
  85. @override
  86. void didPush() {
  87. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  88. setState(() => _model.isRouteVisible = true);
  89. debugLogWidgetClass(_model);
  90. }
  91. }
  92. @override
  93. void didPop() {
  94. _model.isRouteVisible = false;
  95. }
  96. @override
  97. void didPushNext() {
  98. _model.isRouteVisible = false;
  99. }
  100. @override
  101. Widget build(BuildContext context) {
  102. DebugFlutterFlowModelContext.maybeOf(context)
  103. ?.parentModelCallback
  104. ?.call(_model);
  105. _model.tagCategorieComponentModels.clear();
  106. return Padding(
  107. padding: EdgeInsetsDirectional.fromSTEB(12.0, 12.0, 12.0, 12.0),
  108. child: InkWell(
  109. splashColor: Colors.transparent,
  110. focusColor: Colors.transparent,
  111. hoverColor: Colors.transparent,
  112. highlightColor: Colors.transparent,
  113. onTap: () async {
  114. context.pushNamed(
  115. EventCurrentWidget.routeName,
  116. queryParameters: {
  117. 'nid': serializeParam(
  118. widget!.nid?.toString(),
  119. ParamType.String,
  120. ),
  121. 'horecaid': serializeParam(
  122. widget!.horecagelegenheidNid?.toString(),
  123. ParamType.String,
  124. ),
  125. }.withoutNulls,
  126. );
  127. },
  128. child: Container(
  129. height: () {
  130. if (MediaQuery.sizeOf(context).width < kBreakpointSmall) {
  131. return 160.0;
  132. } else if (MediaQuery.sizeOf(context).width < kBreakpointMedium) {
  133. return 200.0;
  134. } else if (MediaQuery.sizeOf(context).width < kBreakpointLarge) {
  135. return 240.0;
  136. } else {
  137. return 280.0;
  138. }
  139. }(),
  140. decoration: BoxDecoration(
  141. color: Colors.white,
  142. boxShadow: [
  143. BoxShadow(
  144. blurRadius: 4.0,
  145. color: Color(0x33000000),
  146. offset: Offset(
  147. 0.0,
  148. 2.0,
  149. ),
  150. )
  151. ],
  152. borderRadius: BorderRadius.only(
  153. topLeft: Radius.circular(12.0),
  154. topRight: Radius.circular(12.0),
  155. bottomLeft: Radius.circular(12.0),
  156. bottomRight: Radius.circular(12.0),
  157. ),
  158. ),
  159. child: Row(
  160. mainAxisSize: MainAxisSize.max,
  161. children: [
  162. Expanded(
  163. flex: 3,
  164. child: Container(
  165. decoration: BoxDecoration(
  166. color: FlutterFlowTheme.of(context).secondaryBackground,
  167. ),
  168. child: Stack(
  169. children: [
  170. Align(
  171. alignment: AlignmentDirectional(0.0, 1.0),
  172. child: Builder(
  173. builder: (context) {
  174. if (widget!.logo != null) {
  175. return ClipRRect(
  176. borderRadius: BorderRadius.circular(8.0),
  177. child: OctoImage(
  178. placeholderBuilder: (_) => SizedBox.expand(
  179. child: Image(
  180. image: BlurHashImage(
  181. 'L6PZfSi_.AyE_3t7t7R**0o#DgR4'),
  182. fit: BoxFit.cover,
  183. ),
  184. ),
  185. image: CachedNetworkImageProvider(
  186. widget!.logo!.toString(),
  187. ),
  188. width: double.infinity,
  189. height: double.infinity,
  190. fit: BoxFit.fitHeight,
  191. ),
  192. );
  193. } else {
  194. return Icon(
  195. Icons.image_not_supported,
  196. color: FlutterFlowTheme.of(context).primaryText,
  197. size: 24.0,
  198. );
  199. }
  200. },
  201. ),
  202. ),
  203. Align(
  204. alignment: AlignmentDirectional(-0.92, 0.76),
  205. child: Padding(
  206. padding: EdgeInsetsDirectional.fromSTEB(
  207. 8.0, 4.0, 8.0, 4.0),
  208. child: Container(
  209. decoration: BoxDecoration(),
  210. child: Builder(
  211. builder: (context) {
  212. final categorieitem =
  213. widget!.categorie?.toList() ?? [];
  214. _model.debugGeneratorVariables[
  215. 'categorieitem${categorieitem.length > 100 ? ' (first 100)' : ''}'] =
  216. debugSerializeParam(
  217. categorieitem.take(100),
  218. ParamType.JSON,
  219. isList: true,
  220. link:
  221. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=UitgaantabelKaart',
  222. name: 'dynamic',
  223. nullable: false,
  224. );
  225. debugLogWidgetClass(_model);
  226. return Wrap(
  227. spacing: 0.0,
  228. runSpacing: 0.0,
  229. alignment: WrapAlignment.start,
  230. crossAxisAlignment: WrapCrossAlignment.start,
  231. direction: Axis.horizontal,
  232. runAlignment: WrapAlignment.start,
  233. verticalDirection: VerticalDirection.down,
  234. clipBehavior: Clip.none,
  235. children: List.generate(categorieitem.length,
  236. (categorieitemIndex) {
  237. final categorieitemItem =
  238. categorieitem[categorieitemIndex];
  239. return Builder(builder: (_) {
  240. return DebugFlutterFlowModelContext(
  241. rootModel: _model.rootModel,
  242. parentModelCallback: (m) {
  243. _model.tagCategorieComponentModels[
  244. 'Keynhs_${categorieitemIndex}_of_${categorieitem.length}'] = m;
  245. },
  246. child: TagCategorieComponentWidget(
  247. key: Key(
  248. 'Keynhs_${categorieitemIndex}_of_${categorieitem.length}'),
  249. categorieTag:
  250. categorieitemItem.toString(),
  251. ),
  252. );
  253. });
  254. }),
  255. );
  256. },
  257. ),
  258. ),
  259. ),
  260. ),
  261. ],
  262. ),
  263. ),
  264. ),
  265. Expanded(
  266. flex: 6,
  267. child: Padding(
  268. padding: EdgeInsetsDirectional.fromSTEB(6.0, 0.0, 0.0, 0.0),
  269. child: ClipRRect(
  270. child: Container(
  271. decoration: BoxDecoration(
  272. color: FlutterFlowTheme.of(context).secondaryBackground,
  273. ),
  274. child: Align(
  275. alignment: AlignmentDirectional(-1.0, 0.0),
  276. child: Column(
  277. mainAxisSize: MainAxisSize.max,
  278. mainAxisAlignment: MainAxisAlignment.start,
  279. crossAxisAlignment: CrossAxisAlignment.start,
  280. children: [
  281. Padding(
  282. padding: EdgeInsetsDirectional.fromSTEB(
  283. 0.0, 0.0, 0.0, 5.0),
  284. child: AutoSizeText(
  285. widget!.titel!.toString(),
  286. style: FlutterFlowTheme.of(context)
  287. .bodyLarge
  288. .override(
  289. font: GoogleFonts.inter(
  290. fontWeight: FlutterFlowTheme.of(context)
  291. .bodyLarge
  292. .fontWeight,
  293. fontStyle: FlutterFlowTheme.of(context)
  294. .bodyLarge
  295. .fontStyle,
  296. ),
  297. letterSpacing: 0.0,
  298. fontWeight: FlutterFlowTheme.of(context)
  299. .bodyLarge
  300. .fontWeight,
  301. fontStyle: FlutterFlowTheme.of(context)
  302. .bodyLarge
  303. .fontStyle,
  304. shadows: [
  305. Shadow(
  306. color: FlutterFlowTheme.of(context)
  307. .secondaryText,
  308. offset: Offset(0.0, 0.0),
  309. blurRadius: 0.0,
  310. )
  311. ],
  312. ),
  313. overflow: TextOverflow.ellipsis,
  314. ),
  315. ),
  316. Row(
  317. mainAxisSize: MainAxisSize.max,
  318. children: [
  319. Padding(
  320. padding: EdgeInsetsDirectional.fromSTEB(
  321. 2.0, 0.0, 4.0, 0.0),
  322. child: Icon(
  323. Icons.add_business_rounded,
  324. color: FlutterFlowTheme.of(context)
  325. .primaryText,
  326. size: 20.0,
  327. ),
  328. ),
  329. Flexible(
  330. child: Text(
  331. widget!.horecagelegenheid!.toString(),
  332. style: FlutterFlowTheme.of(context)
  333. .bodySmall
  334. .override(
  335. font: GoogleFonts.inter(
  336. fontWeight:
  337. FlutterFlowTheme.of(context)
  338. .bodySmall
  339. .fontWeight,
  340. fontStyle:
  341. FlutterFlowTheme.of(context)
  342. .bodySmall
  343. .fontStyle,
  344. ),
  345. letterSpacing: 0.0,
  346. fontWeight:
  347. FlutterFlowTheme.of(context)
  348. .bodySmall
  349. .fontWeight,
  350. fontStyle:
  351. FlutterFlowTheme.of(context)
  352. .bodySmall
  353. .fontStyle,
  354. ),
  355. ),
  356. ),
  357. ],
  358. ),
  359. Row(
  360. mainAxisSize: MainAxisSize.max,
  361. children: [
  362. Padding(
  363. padding: EdgeInsetsDirectional.fromSTEB(
  364. 2.0, 0.0, 4.0, 0.0),
  365. child: Icon(
  366. Icons.location_on_sharp,
  367. color: FlutterFlowTheme.of(context)
  368. .primaryText,
  369. size: 20.0,
  370. ),
  371. ),
  372. Flexible(
  373. child: Text(
  374. widget!.adres!.toString(),
  375. style: FlutterFlowTheme.of(context)
  376. .bodySmall
  377. .override(
  378. font: GoogleFonts.inter(
  379. fontWeight:
  380. FlutterFlowTheme.of(context)
  381. .bodySmall
  382. .fontWeight,
  383. fontStyle:
  384. FlutterFlowTheme.of(context)
  385. .bodySmall
  386. .fontStyle,
  387. ),
  388. letterSpacing: 0.0,
  389. fontWeight:
  390. FlutterFlowTheme.of(context)
  391. .bodySmall
  392. .fontWeight,
  393. fontStyle:
  394. FlutterFlowTheme.of(context)
  395. .bodySmall
  396. .fontStyle,
  397. ),
  398. ),
  399. ),
  400. Text(
  401. FFLocalizations.of(context).getText(
  402. 'p3hbyhqm' /* , */,
  403. ),
  404. style: FlutterFlowTheme.of(context)
  405. .bodyMedium
  406. .override(
  407. font: GoogleFonts.inter(
  408. fontWeight:
  409. FlutterFlowTheme.of(context)
  410. .bodyMedium
  411. .fontWeight,
  412. fontStyle:
  413. FlutterFlowTheme.of(context)
  414. .bodyMedium
  415. .fontStyle,
  416. ),
  417. letterSpacing: 0.0,
  418. fontWeight: FlutterFlowTheme.of(context)
  419. .bodyMedium
  420. .fontWeight,
  421. fontStyle: FlutterFlowTheme.of(context)
  422. .bodyMedium
  423. .fontStyle,
  424. ),
  425. ),
  426. Text(
  427. widget!.plaats!.toString(),
  428. style: FlutterFlowTheme.of(context)
  429. .bodySmall
  430. .override(
  431. font: GoogleFonts.inter(
  432. fontWeight:
  433. FlutterFlowTheme.of(context)
  434. .bodySmall
  435. .fontWeight,
  436. fontStyle:
  437. FlutterFlowTheme.of(context)
  438. .bodySmall
  439. .fontStyle,
  440. ),
  441. letterSpacing: 0.0,
  442. fontWeight: FlutterFlowTheme.of(context)
  443. .bodySmall
  444. .fontWeight,
  445. fontStyle: FlutterFlowTheme.of(context)
  446. .bodySmall
  447. .fontStyle,
  448. ),
  449. ),
  450. ],
  451. ),
  452. Row(
  453. mainAxisSize: MainAxisSize.max,
  454. children: [
  455. Padding(
  456. padding: EdgeInsetsDirectional.fromSTEB(
  457. 2.0, 0.0, 4.0, 0.0),
  458. child: Icon(
  459. Icons.calendar_month,
  460. color: FlutterFlowTheme.of(context)
  461. .primaryText,
  462. size: 20.0,
  463. ),
  464. ),
  465. Flexible(
  466. child: Text(
  467. widget!.datum!.toString(),
  468. style: FlutterFlowTheme.of(context)
  469. .bodySmall
  470. .override(
  471. font: GoogleFonts.inter(
  472. fontWeight:
  473. FlutterFlowTheme.of(context)
  474. .bodySmall
  475. .fontWeight,
  476. fontStyle:
  477. FlutterFlowTheme.of(context)
  478. .bodySmall
  479. .fontStyle,
  480. ),
  481. letterSpacing: 0.0,
  482. fontWeight:
  483. FlutterFlowTheme.of(context)
  484. .bodySmall
  485. .fontWeight,
  486. fontStyle:
  487. FlutterFlowTheme.of(context)
  488. .bodySmall
  489. .fontStyle,
  490. ),
  491. ),
  492. ),
  493. ],
  494. ),
  495. Expanded(
  496. child: Builder(
  497. builder: (context) {
  498. if (widget!.inhoud != null) {
  499. return Text(
  500. widget!.inhoud!.toString(),
  501. textAlign: TextAlign.start,
  502. style: FlutterFlowTheme.of(context)
  503. .bodySmall
  504. .override(
  505. font: GoogleFonts.inter(
  506. fontWeight:
  507. FlutterFlowTheme.of(context)
  508. .bodySmall
  509. .fontWeight,
  510. fontStyle:
  511. FlutterFlowTheme.of(context)
  512. .bodySmall
  513. .fontStyle,
  514. ),
  515. letterSpacing: 0.0,
  516. fontWeight:
  517. FlutterFlowTheme.of(context)
  518. .bodySmall
  519. .fontWeight,
  520. fontStyle:
  521. FlutterFlowTheme.of(context)
  522. .bodySmall
  523. .fontStyle,
  524. ),
  525. overflow: TextOverflow.ellipsis,
  526. );
  527. } else {
  528. return Text(
  529. FFLocalizations.of(context).getText(
  530. 'q3hgdkv4' /* Binnenkort meer... */,
  531. ),
  532. style: FlutterFlowTheme.of(context)
  533. .bodyMedium
  534. .override(
  535. font: GoogleFonts.inter(
  536. fontWeight:
  537. FlutterFlowTheme.of(context)
  538. .bodyMedium
  539. .fontWeight,
  540. fontStyle:
  541. FlutterFlowTheme.of(context)
  542. .bodyMedium
  543. .fontStyle,
  544. ),
  545. letterSpacing: 0.0,
  546. fontWeight:
  547. FlutterFlowTheme.of(context)
  548. .bodyMedium
  549. .fontWeight,
  550. fontStyle:
  551. FlutterFlowTheme.of(context)
  552. .bodyMedium
  553. .fontStyle,
  554. ),
  555. );
  556. }
  557. },
  558. ),
  559. ),
  560. ],
  561. ),
  562. ),
  563. ),
  564. ),
  565. ),
  566. ),
  567. ],
  568. ),
  569. ),
  570. ),
  571. );
  572. }
  573. }