kaart_tabel_uitgaan_s_comp_widget.dart 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  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 '/custom_code/widgets/index.dart' as custom_widgets;
  7. import 'package:flutter/material.dart';
  8. import 'package:flutter_spinkit/flutter_spinkit.dart';
  9. import 'package:google_fonts/google_fonts.dart';
  10. import 'package:provider/provider.dart';
  11. import 'kaart_tabel_uitgaan_s_comp_model.dart';
  12. export 'kaart_tabel_uitgaan_s_comp_model.dart';
  13. class KaartTabelUitgaanSCompWidget extends StatefulWidget {
  14. const KaartTabelUitgaanSCompWidget({
  15. super.key,
  16. this.titel,
  17. this.logo,
  18. this.categorie,
  19. this.date,
  20. this.horecagelegenheid,
  21. this.adres,
  22. this.plaats,
  23. this.inhoud,
  24. });
  25. final String? titel;
  26. final String? logo;
  27. final List<String>? categorie;
  28. final String? date;
  29. final String? horecagelegenheid;
  30. final String? adres;
  31. final String? plaats;
  32. final String? inhoud;
  33. @override
  34. State<KaartTabelUitgaanSCompWidget> createState() =>
  35. _KaartTabelUitgaanSCompWidgetState();
  36. }
  37. class _KaartTabelUitgaanSCompWidgetState
  38. extends State<KaartTabelUitgaanSCompWidget> with RouteAware {
  39. late KaartTabelUitgaanSCompModel _model;
  40. @override
  41. void setState(VoidCallback callback) {
  42. super.setState(callback);
  43. _model.onUpdate();
  44. }
  45. @override
  46. void initState() {
  47. super.initState();
  48. _model = createModel(context, () => KaartTabelUitgaanSCompModel());
  49. }
  50. @override
  51. void dispose() {
  52. routeObserver.unsubscribe(this);
  53. _model.maybeDispose();
  54. super.dispose();
  55. }
  56. @override
  57. void didUpdateWidget(KaartTabelUitgaanSCompWidget oldWidget) {
  58. super.didUpdateWidget(oldWidget);
  59. _model.widget = widget;
  60. }
  61. @override
  62. void didChangeDependencies() {
  63. super.didChangeDependencies();
  64. final route = DebugModalRoute.of(context);
  65. if (route != null) {
  66. routeObserver.subscribe(this, route);
  67. }
  68. debugLogGlobalProperty(context);
  69. }
  70. @override
  71. void didPopNext() {
  72. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  73. setState(() => _model.isRouteVisible = true);
  74. debugLogWidgetClass(_model);
  75. }
  76. }
  77. @override
  78. void didPush() {
  79. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  80. setState(() => _model.isRouteVisible = true);
  81. debugLogWidgetClass(_model);
  82. }
  83. }
  84. @override
  85. void didPop() {
  86. _model.isRouteVisible = false;
  87. }
  88. @override
  89. void didPushNext() {
  90. _model.isRouteVisible = false;
  91. }
  92. @override
  93. Widget build(BuildContext context) {
  94. DebugFlutterFlowModelContext.maybeOf(context)
  95. ?.parentModelCallback
  96. ?.call(_model);
  97. _model.tagCategorieComponentModels.clear();
  98. return Column(
  99. mainAxisSize: MainAxisSize.max,
  100. children: [
  101. Padding(
  102. padding: EdgeInsetsDirectional.fromSTEB(6.0, 4.0, 0.0, 0.0),
  103. child: Text(
  104. valueOrDefault<String>(
  105. widget!.titel,
  106. 'Evenement',
  107. ),
  108. style: FlutterFlowTheme.of(context).titleLarge.override(
  109. font: GoogleFonts.interTight(
  110. fontWeight: FlutterFlowTheme.of(context).titleLarge.fontWeight,
  111. fontStyle: FlutterFlowTheme.of(context).titleLarge.fontStyle,
  112. ),
  113. letterSpacing: 0.0,
  114. fontWeight: FlutterFlowTheme.of(context).titleLarge.fontWeight,
  115. fontStyle: FlutterFlowTheme.of(context).titleLarge.fontStyle,
  116. shadows: [
  117. Shadow(
  118. color: FlutterFlowTheme.of(context).secondaryText,
  119. offset: Offset(2.0, 2.0),
  120. blurRadius: 2.0,
  121. )
  122. ],
  123. ),
  124. ),
  125. ),
  126. Align(
  127. alignment: AlignmentDirectional(0.0, -1.0),
  128. child: Row(
  129. mainAxisSize: MainAxisSize.max,
  130. children: [
  131. Align(
  132. alignment: AlignmentDirectional(1.0, 1.0),
  133. child: Container(
  134. width: MediaQuery.sizeOf(context).width * 0.3,
  135. decoration: BoxDecoration(),
  136. child: Align(
  137. alignment: AlignmentDirectional(1.0, 0.0),
  138. child: Stack(
  139. alignment: AlignmentDirectional(1.0, 0.0),
  140. children: [
  141. Align(
  142. alignment: AlignmentDirectional(1.0, 0.0),
  143. child: Builder(
  144. builder: (context) {
  145. if (widget!.logo != '') {
  146. return ClipRRect(
  147. borderRadius: BorderRadius.only(),
  148. child: Image.network(
  149. widget!.logo!,
  150. height: 220.0,
  151. fit: BoxFit.fitHeight,
  152. ),
  153. );
  154. } else {
  155. return Icon(
  156. Icons.image_not_supported,
  157. color:
  158. FlutterFlowTheme.of(context).primaryText,
  159. size: 24.0,
  160. );
  161. }
  162. },
  163. ),
  164. ),
  165. Align(
  166. alignment: AlignmentDirectional(1.0, 1.0),
  167. child: Padding(
  168. padding: EdgeInsetsDirectional.fromSTEB(
  169. 0.0, 150.0, 0.0, 0.0),
  170. child: Builder(
  171. builder: (context) {
  172. final categories =
  173. widget!.categorie?.toList() ?? [];
  174. _model.debugGeneratorVariables[
  175. 'categories${categories.length > 100 ? ' (first 100)' : ''}'] =
  176. debugSerializeParam(
  177. categories.take(100),
  178. ParamType.String,
  179. isList: true,
  180. link:
  181. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kaartTabelUitgaanSComp',
  182. name: 'String',
  183. nullable: false,
  184. );
  185. debugLogWidgetClass(_model);
  186. return Row(
  187. mainAxisSize: MainAxisSize.max,
  188. mainAxisAlignment: MainAxisAlignment.end,
  189. crossAxisAlignment: CrossAxisAlignment.end,
  190. children: List.generate(categories.length,
  191. (categoriesIndex) {
  192. final categoriesItem =
  193. categories[categoriesIndex];
  194. return Builder(builder: (_) {
  195. return DebugFlutterFlowModelContext(
  196. rootModel: _model.rootModel,
  197. parentModelCallback: (m) {
  198. _model.tagCategorieComponentModels[
  199. 'Keyf89_${categoriesIndex}_of_${categories.length}'] = m;
  200. },
  201. child: TagCategorieComponentWidget(
  202. key: Key(
  203. 'Keyf89_${categoriesIndex}_of_${categories.length}'),
  204. categorieTag: categoriesItem,
  205. ),
  206. );
  207. });
  208. }),
  209. );
  210. },
  211. ),
  212. ),
  213. ),
  214. ],
  215. ),
  216. ),
  217. ),
  218. ),
  219. Align(
  220. alignment: AlignmentDirectional(0.0, -1.0),
  221. child: Container(
  222. decoration: BoxDecoration(),
  223. alignment: AlignmentDirectional(0.0, -1.0),
  224. child: Column(
  225. mainAxisSize: MainAxisSize.max,
  226. crossAxisAlignment: CrossAxisAlignment.start,
  227. children: [
  228. Align(
  229. alignment: AlignmentDirectional(0.0, 0.0),
  230. child: Row(
  231. mainAxisSize: MainAxisSize.max,
  232. children: [
  233. Padding(
  234. padding: EdgeInsetsDirectional.fromSTEB(
  235. 3.0, 0.0, 6.0, 0.0),
  236. child: Icon(
  237. Icons.calendar_month,
  238. color: FlutterFlowTheme.of(context).primaryText,
  239. size: 24.0,
  240. ),
  241. ),
  242. Text(
  243. widget!.date!,
  244. style: FlutterFlowTheme.of(context)
  245. .titleSmall
  246. .override(
  247. font: GoogleFonts.interTight(
  248. fontWeight: FlutterFlowTheme.of(context)
  249. .titleSmall
  250. .fontWeight,
  251. fontStyle: FlutterFlowTheme.of(context)
  252. .titleSmall
  253. .fontStyle,
  254. ),
  255. letterSpacing: 0.0,
  256. fontWeight: FlutterFlowTheme.of(context)
  257. .titleSmall
  258. .fontWeight,
  259. fontStyle: FlutterFlowTheme.of(context)
  260. .titleSmall
  261. .fontStyle,
  262. ),
  263. ),
  264. ],
  265. ),
  266. ),
  267. Padding(
  268. padding:
  269. EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 2.0),
  270. child: Row(
  271. mainAxisSize: MainAxisSize.max,
  272. children: [
  273. Padding(
  274. padding: EdgeInsetsDirectional.fromSTEB(
  275. 3.0, 0.0, 6.0, 0.0),
  276. child: Icon(
  277. Icons.add_business_rounded,
  278. color: FlutterFlowTheme.of(context).primaryText,
  279. size: 24.0,
  280. ),
  281. ),
  282. Text(
  283. widget!.horecagelegenheid!,
  284. style: FlutterFlowTheme.of(context)
  285. .bodyMedium
  286. .override(
  287. font: GoogleFonts.inter(
  288. fontWeight: FlutterFlowTheme.of(context)
  289. .bodyMedium
  290. .fontWeight,
  291. fontStyle: FlutterFlowTheme.of(context)
  292. .bodyMedium
  293. .fontStyle,
  294. ),
  295. letterSpacing: 0.0,
  296. fontWeight: FlutterFlowTheme.of(context)
  297. .bodyMedium
  298. .fontWeight,
  299. fontStyle: FlutterFlowTheme.of(context)
  300. .bodyMedium
  301. .fontStyle,
  302. ),
  303. ),
  304. ],
  305. ),
  306. ),
  307. Row(
  308. mainAxisSize: MainAxisSize.max,
  309. children: [
  310. Padding(
  311. padding: EdgeInsetsDirectional.fromSTEB(
  312. 3.0, 0.0, 6.0, 0.0),
  313. child: Icon(
  314. Icons.location_on_sharp,
  315. color: FlutterFlowTheme.of(context).primaryText,
  316. size: 24.0,
  317. ),
  318. ),
  319. Text(
  320. widget!.adres!,
  321. style: FlutterFlowTheme.of(context)
  322. .bodyMedium
  323. .override(
  324. font: GoogleFonts.inter(
  325. fontWeight: FlutterFlowTheme.of(context)
  326. .bodyMedium
  327. .fontWeight,
  328. fontStyle: FlutterFlowTheme.of(context)
  329. .bodyMedium
  330. .fontStyle,
  331. ),
  332. letterSpacing: 0.0,
  333. fontWeight: FlutterFlowTheme.of(context)
  334. .bodyMedium
  335. .fontWeight,
  336. fontStyle: FlutterFlowTheme.of(context)
  337. .bodyMedium
  338. .fontStyle,
  339. ),
  340. ),
  341. Padding(
  342. padding: EdgeInsetsDirectional.fromSTEB(
  343. 8.0, 0.0, 0.0, 0.0),
  344. child: Text(
  345. widget!.plaats!,
  346. style: FlutterFlowTheme.of(context)
  347. .bodyMedium
  348. .override(
  349. font: GoogleFonts.inter(
  350. fontWeight: FlutterFlowTheme.of(context)
  351. .bodyMedium
  352. .fontWeight,
  353. fontStyle: FlutterFlowTheme.of(context)
  354. .bodyMedium
  355. .fontStyle,
  356. ),
  357. letterSpacing: 0.0,
  358. fontWeight: FlutterFlowTheme.of(context)
  359. .bodyMedium
  360. .fontWeight,
  361. fontStyle: FlutterFlowTheme.of(context)
  362. .bodyMedium
  363. .fontStyle,
  364. ),
  365. ),
  366. ),
  367. ],
  368. ),
  369. Padding(
  370. padding:
  371. EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 2.0),
  372. child: Row(
  373. mainAxisSize: MainAxisSize.max,
  374. crossAxisAlignment: CrossAxisAlignment.start,
  375. children: [
  376. Align(
  377. alignment: AlignmentDirectional(0.0, -1.0),
  378. child: Padding(
  379. padding: EdgeInsetsDirectional.fromSTEB(
  380. 3.0, 0.0, 6.0, 0.0),
  381. child: Icon(
  382. Icons.message,
  383. color:
  384. FlutterFlowTheme.of(context).primaryText,
  385. size: 24.0,
  386. ),
  387. ),
  388. ),
  389. Container(
  390. width: MediaQuery.sizeOf(context).width * 0.4,
  391. height: 80.0,
  392. child: custom_widgets.FromHTML(
  393. HTMLParameter: widget!.inhoud!,
  394. width: MediaQuery.sizeOf(context).width * 0.4,
  395. height: 80.0,
  396. ),
  397. ),
  398. ],
  399. ),
  400. ),
  401. ],
  402. ),
  403. ),
  404. ),
  405. ],
  406. ),
  407. ),
  408. ],
  409. );
  410. }
  411. }