kaart_slider_uitgaan_s_comp_widget.dart 17 KB

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