uitgaantabel_kaart_widget.dart 24 KB

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