evenement_info_widget.dart 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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 'dart:ui';
  5. import 'package:flutter/material.dart';
  6. import 'package:flutter_spinkit/flutter_spinkit.dart';
  7. import 'package:google_fonts/google_fonts.dart';
  8. import 'package:provider/provider.dart';
  9. import 'evenement_info_model.dart';
  10. export 'evenement_info_model.dart';
  11. class EvenementInfoWidget extends StatefulWidget {
  12. const EvenementInfoWidget({
  13. super.key,
  14. this.nid,
  15. this.fotoos,
  16. this.title,
  17. this.date,
  18. this.categories,
  19. this.adres,
  20. this.plaats,
  21. this.entreetoelichting,
  22. this.entreeprijs,
  23. this.website,
  24. this.contact,
  25. this.logo,
  26. });
  27. final String? nid;
  28. final List<String>? fotoos;
  29. final String? title;
  30. final String? date;
  31. final List<String>? categories;
  32. final String? adres;
  33. final String? plaats;
  34. final String? entreetoelichting;
  35. final String? entreeprijs;
  36. final String? website;
  37. final String? contact;
  38. final String? logo;
  39. @override
  40. State<EvenementInfoWidget> createState() => _EvenementInfoWidgetState();
  41. }
  42. class _EvenementInfoWidgetState extends State<EvenementInfoWidget>
  43. with RouteAware {
  44. late EvenementInfoModel _model;
  45. @override
  46. void setState(VoidCallback callback) {
  47. super.setState(callback);
  48. _model.onUpdate();
  49. }
  50. @override
  51. void initState() {
  52. super.initState();
  53. _model = createModel(context, () => EvenementInfoModel());
  54. }
  55. @override
  56. void dispose() {
  57. routeObserver.unsubscribe(this);
  58. _model.maybeDispose();
  59. super.dispose();
  60. }
  61. @override
  62. void didUpdateWidget(EvenementInfoWidget oldWidget) {
  63. super.didUpdateWidget(oldWidget);
  64. _model.widget = widget;
  65. }
  66. @override
  67. void didChangeDependencies() {
  68. super.didChangeDependencies();
  69. final route = DebugModalRoute.of(context);
  70. if (route != null) {
  71. routeObserver.subscribe(this, route);
  72. }
  73. debugLogGlobalProperty(context);
  74. }
  75. @override
  76. void didPopNext() {
  77. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  78. setState(() => _model.isRouteVisible = true);
  79. debugLogWidgetClass(_model);
  80. }
  81. }
  82. @override
  83. void didPush() {
  84. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  85. setState(() => _model.isRouteVisible = true);
  86. debugLogWidgetClass(_model);
  87. }
  88. }
  89. @override
  90. void didPop() {
  91. _model.isRouteVisible = false;
  92. }
  93. @override
  94. void didPushNext() {
  95. _model.isRouteVisible = false;
  96. }
  97. @override
  98. Widget build(BuildContext context) {
  99. DebugFlutterFlowModelContext.maybeOf(context)
  100. ?.parentModelCallback
  101. ?.call(_model);
  102. return SingleChildScrollView(
  103. primary: false,
  104. child: Column(
  105. mainAxisSize: MainAxisSize.max,
  106. mainAxisAlignment: MainAxisAlignment.start,
  107. crossAxisAlignment: CrossAxisAlignment.start,
  108. children: [
  109. Row(
  110. mainAxisSize: MainAxisSize.max,
  111. mainAxisAlignment: MainAxisAlignment.start,
  112. children: [
  113. Column(
  114. mainAxisSize: MainAxisSize.max,
  115. children: [
  116. Text(
  117. valueOrDefault<String>(
  118. widget!.adres,
  119. 'Adres onbekend',
  120. ),
  121. style: FlutterFlowTheme.of(context).bodyMedium.override(
  122. font: GoogleFonts.roboto(
  123. fontWeight: FlutterFlowTheme.of(context)
  124. .bodyMedium
  125. .fontWeight,
  126. fontStyle: FlutterFlowTheme.of(context)
  127. .bodyMedium
  128. .fontStyle,
  129. ),
  130. letterSpacing: 0.0,
  131. fontWeight: FlutterFlowTheme.of(context)
  132. .bodyMedium
  133. .fontWeight,
  134. fontStyle:
  135. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  136. ),
  137. ),
  138. Text(
  139. valueOrDefault<String>(
  140. widget!.plaats,
  141. 'Plaats onbekend',
  142. ),
  143. style: FlutterFlowTheme.of(context).bodyMedium.override(
  144. font: GoogleFonts.roboto(
  145. fontWeight: FlutterFlowTheme.of(context)
  146. .bodyMedium
  147. .fontWeight,
  148. fontStyle: FlutterFlowTheme.of(context)
  149. .bodyMedium
  150. .fontStyle,
  151. ),
  152. letterSpacing: 0.0,
  153. fontWeight: FlutterFlowTheme.of(context)
  154. .bodyMedium
  155. .fontWeight,
  156. fontStyle:
  157. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  158. ),
  159. ),
  160. ],
  161. ),
  162. ],
  163. ),
  164. if (widget!.entreeprijs != null && widget!.entreeprijs != '')
  165. Row(
  166. mainAxisSize: MainAxisSize.min,
  167. mainAxisAlignment: MainAxisAlignment.center,
  168. children: [
  169. Text(
  170. FFLocalizations.of(context).getText(
  171. 'gpbaiwi9' /* Entree: */,
  172. ),
  173. textAlign: TextAlign.center,
  174. style: FlutterFlowTheme.of(context).titleSmall.override(
  175. font: GoogleFonts.roboto(
  176. fontWeight: FlutterFlowTheme.of(context)
  177. .titleSmall
  178. .fontWeight,
  179. fontStyle:
  180. FlutterFlowTheme.of(context).titleSmall.fontStyle,
  181. ),
  182. letterSpacing: 0.0,
  183. fontWeight:
  184. FlutterFlowTheme.of(context).titleSmall.fontWeight,
  185. fontStyle:
  186. FlutterFlowTheme.of(context).titleSmall.fontStyle,
  187. ),
  188. ),
  189. Column(
  190. mainAxisSize: MainAxisSize.min,
  191. children: [
  192. if (widget!.entreeprijs != null &&
  193. widget!.entreeprijs != '')
  194. Text(
  195. valueOrDefault<String>(
  196. widget!.entreeprijs,
  197. 'Prijs onbekend',
  198. ),
  199. style: FlutterFlowTheme.of(context).bodyMedium.override(
  200. font: GoogleFonts.roboto(
  201. fontWeight: FlutterFlowTheme.of(context)
  202. .bodyMedium
  203. .fontWeight,
  204. fontStyle: FlutterFlowTheme.of(context)
  205. .bodyMedium
  206. .fontStyle,
  207. ),
  208. letterSpacing: 0.0,
  209. fontWeight: FlutterFlowTheme.of(context)
  210. .bodyMedium
  211. .fontWeight,
  212. fontStyle: FlutterFlowTheme.of(context)
  213. .bodyMedium
  214. .fontStyle,
  215. ),
  216. ),
  217. if (widget!.entreetoelichting != null &&
  218. widget!.entreetoelichting != '')
  219. Text(
  220. valueOrDefault<String>(
  221. widget!.entreetoelichting,
  222. 'Geen toelichting',
  223. ),
  224. style: FlutterFlowTheme.of(context).bodyMedium.override(
  225. font: GoogleFonts.roboto(
  226. fontWeight: FlutterFlowTheme.of(context)
  227. .bodyMedium
  228. .fontWeight,
  229. fontStyle: FlutterFlowTheme.of(context)
  230. .bodyMedium
  231. .fontStyle,
  232. ),
  233. letterSpacing: 0.0,
  234. fontWeight: FlutterFlowTheme.of(context)
  235. .bodyMedium
  236. .fontWeight,
  237. fontStyle: FlutterFlowTheme.of(context)
  238. .bodyMedium
  239. .fontStyle,
  240. ),
  241. ),
  242. ],
  243. ),
  244. ],
  245. ),
  246. if (widget!.website != null && widget!.website != '')
  247. InkWell(
  248. splashColor: Colors.transparent,
  249. focusColor: Colors.transparent,
  250. hoverColor: Colors.transparent,
  251. highlightColor: Colors.transparent,
  252. onTap: () async {
  253. await launchURL(widget!.website!);
  254. },
  255. child: Text(
  256. valueOrDefault<String>(
  257. widget!.website,
  258. 'website',
  259. ),
  260. style: FlutterFlowTheme.of(context).bodyMedium.override(
  261. font: GoogleFonts.roboto(
  262. fontWeight:
  263. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  264. fontStyle:
  265. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  266. ),
  267. letterSpacing: 0.0,
  268. fontWeight:
  269. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  270. fontStyle:
  271. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  272. ),
  273. ),
  274. ),
  275. if (widget!.contact != null && widget!.contact != '')
  276. Text(
  277. valueOrDefault<String>(
  278. widget!.contact,
  279. 'Contact onbekend',
  280. ),
  281. style: FlutterFlowTheme.of(context).bodyMedium.override(
  282. font: GoogleFonts.roboto(
  283. fontWeight:
  284. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  285. fontStyle:
  286. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  287. ),
  288. letterSpacing: 0.0,
  289. fontWeight:
  290. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  291. fontStyle:
  292. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  293. ),
  294. ),
  295. ],
  296. ),
  297. );
  298. }
  299. }