uitgaantabel_kaart_widget.dart 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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. fit: BoxFit.fitHeight,
  189. ),
  190. );
  191. } else {
  192. return Icon(
  193. Icons.image_not_supported,
  194. color: FlutterFlowTheme.of(context).primaryText,
  195. size: 24.0,
  196. );
  197. }
  198. },
  199. ),
  200. ),
  201. Align(
  202. alignment: AlignmentDirectional(-0.92, 0.76),
  203. child: Padding(
  204. padding: EdgeInsetsDirectional.fromSTEB(
  205. 8.0, 4.0, 8.0, 4.0),
  206. child: Container(
  207. decoration: BoxDecoration(),
  208. child: Builder(
  209. builder: (context) {
  210. final categorieitem =
  211. widget!.categorie?.toList() ?? [];
  212. _model.debugGeneratorVariables[
  213. 'categorieitem${categorieitem.length > 100 ? ' (first 100)' : ''}'] =
  214. debugSerializeParam(
  215. categorieitem.take(100),
  216. ParamType.JSON,
  217. isList: true,
  218. link:
  219. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=UitgaantabelKaart',
  220. name: 'dynamic',
  221. nullable: false,
  222. );
  223. debugLogWidgetClass(_model);
  224. return Wrap(
  225. spacing: 0.0,
  226. runSpacing: 0.0,
  227. alignment: WrapAlignment.start,
  228. crossAxisAlignment: WrapCrossAlignment.start,
  229. direction: Axis.horizontal,
  230. runAlignment: WrapAlignment.start,
  231. verticalDirection: VerticalDirection.down,
  232. clipBehavior: Clip.none,
  233. children: List.generate(categorieitem.length,
  234. (categorieitemIndex) {
  235. final categorieitemItem =
  236. categorieitem[categorieitemIndex];
  237. return Builder(builder: (_) {
  238. return DebugFlutterFlowModelContext(
  239. rootModel: _model.rootModel,
  240. parentModelCallback: (m) {
  241. _model.tagCategorieComponentModels[
  242. 'Keynhs_${categorieitemIndex}_of_${categorieitem.length}'] = m;
  243. },
  244. child: TagCategorieComponentWidget(
  245. key: Key(
  246. 'Keynhs_${categorieitemIndex}_of_${categorieitem.length}'),
  247. categorieTag:
  248. categorieitemItem.toString(),
  249. ),
  250. );
  251. });
  252. }),
  253. );
  254. },
  255. ),
  256. ),
  257. ),
  258. ),
  259. ],
  260. ),
  261. ),
  262. ),
  263. Expanded(
  264. flex: 6,
  265. child: Padding(
  266. padding: EdgeInsetsDirectional.fromSTEB(6.0, 0.0, 0.0, 0.0),
  267. child: ClipRRect(
  268. child: Container(
  269. decoration: BoxDecoration(
  270. color: FlutterFlowTheme.of(context).secondaryBackground,
  271. ),
  272. child: Align(
  273. alignment: AlignmentDirectional(-1.0, 0.0),
  274. child: Column(
  275. mainAxisSize: MainAxisSize.max,
  276. mainAxisAlignment: MainAxisAlignment.start,
  277. crossAxisAlignment: CrossAxisAlignment.start,
  278. children: [
  279. Padding(
  280. padding: EdgeInsetsDirectional.fromSTEB(
  281. 0.0, 0.0, 0.0, 5.0),
  282. child: AutoSizeText(
  283. widget!.titel!.toString(),
  284. style: FlutterFlowTheme.of(context)
  285. .bodyLarge
  286. .override(
  287. font: GoogleFonts.inter(
  288. fontWeight: FlutterFlowTheme.of(context)
  289. .bodyLarge
  290. .fontWeight,
  291. fontStyle: FlutterFlowTheme.of(context)
  292. .bodyLarge
  293. .fontStyle,
  294. ),
  295. letterSpacing: 0.0,
  296. fontWeight: FlutterFlowTheme.of(context)
  297. .bodyLarge
  298. .fontWeight,
  299. fontStyle: FlutterFlowTheme.of(context)
  300. .bodyLarge
  301. .fontStyle,
  302. shadows: [
  303. Shadow(
  304. color: FlutterFlowTheme.of(context)
  305. .secondaryText,
  306. offset: Offset(0.0, 0.0),
  307. blurRadius: 0.0,
  308. )
  309. ],
  310. ),
  311. overflow: TextOverflow.ellipsis,
  312. ),
  313. ),
  314. Row(
  315. mainAxisSize: MainAxisSize.max,
  316. children: [
  317. Padding(
  318. padding: EdgeInsetsDirectional.fromSTEB(
  319. 2.0, 0.0, 4.0, 0.0),
  320. child: Icon(
  321. Icons.add_business_rounded,
  322. color: FlutterFlowTheme.of(context)
  323. .primaryText,
  324. size: 20.0,
  325. ),
  326. ),
  327. Flexible(
  328. child: Text(
  329. widget!.horecagelegenheid!.toString(),
  330. style: FlutterFlowTheme.of(context)
  331. .bodySmall
  332. .override(
  333. font: GoogleFonts.inter(
  334. fontWeight:
  335. FlutterFlowTheme.of(context)
  336. .bodySmall
  337. .fontWeight,
  338. fontStyle:
  339. FlutterFlowTheme.of(context)
  340. .bodySmall
  341. .fontStyle,
  342. ),
  343. letterSpacing: 0.0,
  344. fontWeight:
  345. FlutterFlowTheme.of(context)
  346. .bodySmall
  347. .fontWeight,
  348. fontStyle:
  349. FlutterFlowTheme.of(context)
  350. .bodySmall
  351. .fontStyle,
  352. ),
  353. ),
  354. ),
  355. ],
  356. ),
  357. Row(
  358. mainAxisSize: MainAxisSize.max,
  359. children: [
  360. Padding(
  361. padding: EdgeInsetsDirectional.fromSTEB(
  362. 2.0, 0.0, 4.0, 0.0),
  363. child: Icon(
  364. Icons.location_on_sharp,
  365. color: FlutterFlowTheme.of(context)
  366. .primaryText,
  367. size: 20.0,
  368. ),
  369. ),
  370. Flexible(
  371. child: Text(
  372. widget!.adres!.toString(),
  373. style: FlutterFlowTheme.of(context)
  374. .bodySmall
  375. .override(
  376. font: GoogleFonts.inter(
  377. fontWeight:
  378. FlutterFlowTheme.of(context)
  379. .bodySmall
  380. .fontWeight,
  381. fontStyle:
  382. FlutterFlowTheme.of(context)
  383. .bodySmall
  384. .fontStyle,
  385. ),
  386. letterSpacing: 0.0,
  387. fontWeight:
  388. FlutterFlowTheme.of(context)
  389. .bodySmall
  390. .fontWeight,
  391. fontStyle:
  392. FlutterFlowTheme.of(context)
  393. .bodySmall
  394. .fontStyle,
  395. ),
  396. ),
  397. ),
  398. Text(
  399. FFLocalizations.of(context).getText(
  400. 'p3hbyhqm' /* , */,
  401. ),
  402. style: FlutterFlowTheme.of(context)
  403. .bodyMedium
  404. .override(
  405. font: GoogleFonts.inter(
  406. fontWeight:
  407. FlutterFlowTheme.of(context)
  408. .bodyMedium
  409. .fontWeight,
  410. fontStyle:
  411. FlutterFlowTheme.of(context)
  412. .bodyMedium
  413. .fontStyle,
  414. ),
  415. letterSpacing: 0.0,
  416. fontWeight: FlutterFlowTheme.of(context)
  417. .bodyMedium
  418. .fontWeight,
  419. fontStyle: FlutterFlowTheme.of(context)
  420. .bodyMedium
  421. .fontStyle,
  422. ),
  423. ),
  424. Text(
  425. widget!.plaats!.toString(),
  426. style: FlutterFlowTheme.of(context)
  427. .bodySmall
  428. .override(
  429. font: GoogleFonts.inter(
  430. fontWeight:
  431. FlutterFlowTheme.of(context)
  432. .bodySmall
  433. .fontWeight,
  434. fontStyle:
  435. FlutterFlowTheme.of(context)
  436. .bodySmall
  437. .fontStyle,
  438. ),
  439. letterSpacing: 0.0,
  440. fontWeight: FlutterFlowTheme.of(context)
  441. .bodySmall
  442. .fontWeight,
  443. fontStyle: FlutterFlowTheme.of(context)
  444. .bodySmall
  445. .fontStyle,
  446. ),
  447. ),
  448. ],
  449. ),
  450. Row(
  451. mainAxisSize: MainAxisSize.max,
  452. children: [
  453. Padding(
  454. padding: EdgeInsetsDirectional.fromSTEB(
  455. 2.0, 0.0, 4.0, 0.0),
  456. child: Icon(
  457. Icons.calendar_month,
  458. color: FlutterFlowTheme.of(context)
  459. .primaryText,
  460. size: 20.0,
  461. ),
  462. ),
  463. Flexible(
  464. child: Text(
  465. widget!.datum!.toString(),
  466. style: FlutterFlowTheme.of(context)
  467. .bodySmall
  468. .override(
  469. font: GoogleFonts.inter(
  470. fontWeight:
  471. FlutterFlowTheme.of(context)
  472. .bodySmall
  473. .fontWeight,
  474. fontStyle:
  475. FlutterFlowTheme.of(context)
  476. .bodySmall
  477. .fontStyle,
  478. ),
  479. letterSpacing: 0.0,
  480. fontWeight:
  481. FlutterFlowTheme.of(context)
  482. .bodySmall
  483. .fontWeight,
  484. fontStyle:
  485. FlutterFlowTheme.of(context)
  486. .bodySmall
  487. .fontStyle,
  488. ),
  489. ),
  490. ),
  491. ],
  492. ),
  493. Expanded(
  494. child: Builder(
  495. builder: (context) {
  496. if (widget!.inhoud != null) {
  497. return Text(
  498. widget!.inhoud!.toString(),
  499. textAlign: TextAlign.start,
  500. style: FlutterFlowTheme.of(context)
  501. .bodySmall
  502. .override(
  503. font: GoogleFonts.inter(
  504. fontWeight:
  505. FlutterFlowTheme.of(context)
  506. .bodySmall
  507. .fontWeight,
  508. fontStyle:
  509. FlutterFlowTheme.of(context)
  510. .bodySmall
  511. .fontStyle,
  512. ),
  513. letterSpacing: 0.0,
  514. fontWeight:
  515. FlutterFlowTheme.of(context)
  516. .bodySmall
  517. .fontWeight,
  518. fontStyle:
  519. FlutterFlowTheme.of(context)
  520. .bodySmall
  521. .fontStyle,
  522. ),
  523. overflow: TextOverflow.ellipsis,
  524. );
  525. } else {
  526. return Container();
  527. }
  528. },
  529. ),
  530. ),
  531. ],
  532. ),
  533. ),
  534. ),
  535. ),
  536. ),
  537. ),
  538. ],
  539. ),
  540. ),
  541. ),
  542. );
  543. }
  544. }