kaart_tabel_uitgaan_comp_widget.dart 15 KB

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