kaart_tabel_uitgaan_comp_widget.dart 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  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: Builder(
  117. builder: (context) {
  118. if (widget!.logo != '') {
  119. return ClipRRect(
  120. borderRadius: BorderRadius.circular(8.0),
  121. child: Image.network(
  122. widget!.logo!,
  123. height: 220.0,
  124. fit: BoxFit.fitHeight,
  125. ),
  126. );
  127. } else {
  128. return Icon(
  129. Icons.image_not_supported,
  130. color: FlutterFlowTheme.of(context).primaryText,
  131. size: 24.0,
  132. );
  133. }
  134. },
  135. ),
  136. ),
  137. Align(
  138. alignment: AlignmentDirectional(1.0, 1.0),
  139. child: Builder(
  140. builder: (context) {
  141. final categories = widget!.categorie?.toList() ?? [];
  142. _model.debugGeneratorVariables[
  143. 'categories${categories.length > 100 ? ' (first 100)' : ''}'] =
  144. debugSerializeParam(
  145. categories.take(100),
  146. ParamType.String,
  147. isList: true,
  148. link:
  149. 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kaartTabelUitgaanComp',
  150. name: 'String',
  151. nullable: false,
  152. );
  153. debugLogWidgetClass(_model);
  154. return Row(
  155. mainAxisSize: MainAxisSize.max,
  156. mainAxisAlignment: MainAxisAlignment.end,
  157. crossAxisAlignment: CrossAxisAlignment.end,
  158. children: List.generate(categories.length,
  159. (categoriesIndex) {
  160. final categoriesItem =
  161. categories[categoriesIndex];
  162. return Builder(builder: (_) {
  163. return DebugFlutterFlowModelContext(
  164. rootModel: _model.rootModel,
  165. parentModelCallback: (m) {
  166. _model.tagCategorieComponentModels[
  167. 'Keybgq_${categoriesIndex}_of_${categories.length}'] = m;
  168. },
  169. child: TagCategorieComponentWidget(
  170. key: Key(
  171. 'Keybgq_${categoriesIndex}_of_${categories.length}'),
  172. categorieTag: categoriesItem,
  173. ),
  174. );
  175. });
  176. }),
  177. );
  178. },
  179. ),
  180. ),
  181. ],
  182. ),
  183. ),
  184. ),
  185. ),
  186. ),
  187. Container(
  188. decoration: BoxDecoration(),
  189. child: Column(
  190. mainAxisSize: MainAxisSize.max,
  191. crossAxisAlignment: CrossAxisAlignment.start,
  192. children: [
  193. Padding(
  194. padding: EdgeInsetsDirectional.fromSTEB(6.0, 4.0, 0.0, 6.0),
  195. child: Text(
  196. valueOrDefault<String>(
  197. widget!.titel,
  198. 'Evenement',
  199. ),
  200. style: FlutterFlowTheme.of(context).titleLarge.override(
  201. font: GoogleFonts.interTight(
  202. fontWeight:
  203. FlutterFlowTheme.of(context).titleLarge.fontWeight,
  204. fontStyle:
  205. FlutterFlowTheme.of(context).titleLarge.fontStyle,
  206. ),
  207. letterSpacing: 0.0,
  208. fontWeight:
  209. FlutterFlowTheme.of(context).titleLarge.fontWeight,
  210. fontStyle:
  211. FlutterFlowTheme.of(context).titleLarge.fontStyle,
  212. shadows: [
  213. Shadow(
  214. color: FlutterFlowTheme.of(context).secondaryText,
  215. offset: Offset(2.0, 2.0),
  216. blurRadius: 2.0,
  217. )
  218. ],
  219. ),
  220. ),
  221. ),
  222. Align(
  223. alignment: AlignmentDirectional(0.0, 0.0),
  224. child: Padding(
  225. padding: EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 2.0),
  226. child: Row(
  227. mainAxisSize: MainAxisSize.max,
  228. children: [
  229. Padding(
  230. padding:
  231. EdgeInsetsDirectional.fromSTEB(3.0, 0.0, 6.0, 0.0),
  232. child: Icon(
  233. Icons.calendar_month,
  234. color: FlutterFlowTheme.of(context).primaryText,
  235. size: 24.0,
  236. ),
  237. ),
  238. Text(
  239. widget!.datum!,
  240. style: FlutterFlowTheme.of(context).titleSmall.override(
  241. font: GoogleFonts.interTight(
  242. fontWeight: FlutterFlowTheme.of(context)
  243. .titleSmall
  244. .fontWeight,
  245. fontStyle: FlutterFlowTheme.of(context)
  246. .titleSmall
  247. .fontStyle,
  248. ),
  249. letterSpacing: 0.0,
  250. fontWeight: FlutterFlowTheme.of(context)
  251. .titleSmall
  252. .fontWeight,
  253. fontStyle: FlutterFlowTheme.of(context)
  254. .titleSmall
  255. .fontStyle,
  256. ),
  257. ),
  258. ],
  259. ),
  260. ),
  261. ),
  262. Padding(
  263. padding: EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 2.0),
  264. child: Row(
  265. mainAxisSize: MainAxisSize.max,
  266. children: [
  267. Padding(
  268. padding:
  269. EdgeInsetsDirectional.fromSTEB(3.0, 0.0, 6.0, 0.0),
  270. child: Icon(
  271. Icons.add_business_rounded,
  272. color: FlutterFlowTheme.of(context).primaryText,
  273. size: 24.0,
  274. ),
  275. ),
  276. Text(
  277. widget!.horecagelegenheid!,
  278. style: FlutterFlowTheme.of(context).bodyMedium.override(
  279. font: GoogleFonts.inter(
  280. fontWeight: FlutterFlowTheme.of(context)
  281. .bodyMedium
  282. .fontWeight,
  283. fontStyle: FlutterFlowTheme.of(context)
  284. .bodyMedium
  285. .fontStyle,
  286. ),
  287. letterSpacing: 0.0,
  288. fontWeight: FlutterFlowTheme.of(context)
  289. .bodyMedium
  290. .fontWeight,
  291. fontStyle: FlutterFlowTheme.of(context)
  292. .bodyMedium
  293. .fontStyle,
  294. ),
  295. ),
  296. ],
  297. ),
  298. ),
  299. Row(
  300. mainAxisSize: MainAxisSize.max,
  301. children: [
  302. Padding(
  303. padding: EdgeInsetsDirectional.fromSTEB(3.0, 0.0, 6.0, 0.0),
  304. child: Icon(
  305. Icons.location_on_sharp,
  306. color: FlutterFlowTheme.of(context).primaryText,
  307. size: 24.0,
  308. ),
  309. ),
  310. Text(
  311. widget!.adres!,
  312. style: FlutterFlowTheme.of(context).bodyMedium.override(
  313. font: GoogleFonts.inter(
  314. fontWeight: FlutterFlowTheme.of(context)
  315. .bodyMedium
  316. .fontWeight,
  317. fontStyle: FlutterFlowTheme.of(context)
  318. .bodyMedium
  319. .fontStyle,
  320. ),
  321. letterSpacing: 0.0,
  322. fontWeight: FlutterFlowTheme.of(context)
  323. .bodyMedium
  324. .fontWeight,
  325. fontStyle:
  326. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  327. ),
  328. ),
  329. Padding(
  330. padding: EdgeInsetsDirectional.fromSTEB(8.0, 0.0, 0.0, 0.0),
  331. child: AutoSizeText(
  332. widget!.plaats!,
  333. style: FlutterFlowTheme.of(context).bodyMedium.override(
  334. font: GoogleFonts.inter(
  335. fontWeight: FlutterFlowTheme.of(context)
  336. .bodyMedium
  337. .fontWeight,
  338. fontStyle: FlutterFlowTheme.of(context)
  339. .bodyMedium
  340. .fontStyle,
  341. ),
  342. letterSpacing: 0.0,
  343. fontWeight: FlutterFlowTheme.of(context)
  344. .bodyMedium
  345. .fontWeight,
  346. fontStyle: FlutterFlowTheme.of(context)
  347. .bodyMedium
  348. .fontStyle,
  349. ),
  350. overflow: TextOverflow.ellipsis,
  351. ),
  352. ),
  353. ],
  354. ),
  355. Padding(
  356. padding: EdgeInsetsDirectional.fromSTEB(0.0, 2.0, 0.0, 2.0),
  357. child: Row(
  358. mainAxisSize: MainAxisSize.max,
  359. crossAxisAlignment: CrossAxisAlignment.start,
  360. children: [
  361. Align(
  362. alignment: AlignmentDirectional(0.0, -1.0),
  363. child: Padding(
  364. padding:
  365. EdgeInsetsDirectional.fromSTEB(3.0, 0.0, 6.0, 0.0),
  366. child: Icon(
  367. Icons.message,
  368. color: FlutterFlowTheme.of(context).primaryText,
  369. size: 24.0,
  370. ),
  371. ),
  372. ),
  373. Container(
  374. width: MediaQuery.sizeOf(context).width * 0.4,
  375. height: 80.0,
  376. child: custom_widgets.FromHTML(
  377. HTMLParameter: widget!.inhoud!,
  378. width: MediaQuery.sizeOf(context).width * 0.4,
  379. height: 80.0,
  380. ),
  381. ),
  382. ],
  383. ),
  384. ),
  385. ],
  386. ),
  387. ),
  388. ],
  389. );
  390. }
  391. }