evenement_info_widget.dart 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  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.end,
  108. children: [
  109. Row(
  110. mainAxisSize: MainAxisSize.max,
  111. mainAxisAlignment: MainAxisAlignment.end,
  112. children: [
  113. Column(
  114. mainAxisSize: MainAxisSize.max,
  115. children: [
  116. Text(
  117. valueOrDefault<String>(
  118. widget!.adres,
  119. 'adres',
  120. ),
  121. style: FlutterFlowTheme.of(context).bodyMedium.override(
  122. font: GoogleFonts.inter(
  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',
  142. ),
  143. style: FlutterFlowTheme.of(context).bodyMedium.override(
  144. font: GoogleFonts.inter(
  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. Row(
  165. mainAxisSize: MainAxisSize.min,
  166. mainAxisAlignment: MainAxisAlignment.center,
  167. children: [
  168. Text(
  169. FFLocalizations.of(context).getText(
  170. 'gpbaiwi9' /* Entree: */,
  171. ),
  172. textAlign: TextAlign.center,
  173. style: FlutterFlowTheme.of(context).headlineLarge.override(
  174. font: GoogleFonts.interTight(
  175. fontWeight: FlutterFlowTheme.of(context)
  176. .headlineLarge
  177. .fontWeight,
  178. fontStyle: FlutterFlowTheme.of(context)
  179. .headlineLarge
  180. .fontStyle,
  181. ),
  182. letterSpacing: 0.0,
  183. fontWeight:
  184. FlutterFlowTheme.of(context).headlineLarge.fontWeight,
  185. fontStyle:
  186. FlutterFlowTheme.of(context).headlineLarge.fontStyle,
  187. ),
  188. ),
  189. Column(
  190. mainAxisSize: MainAxisSize.min,
  191. children: [
  192. if (widget!.entreeprijs != null && widget!.entreeprijs != '')
  193. Text(
  194. valueOrDefault<String>(
  195. widget!.entreeprijs,
  196. 'entreeprijs',
  197. ),
  198. style: FlutterFlowTheme.of(context).bodyMedium.override(
  199. font: GoogleFonts.inter(
  200. fontWeight: FlutterFlowTheme.of(context)
  201. .bodyMedium
  202. .fontWeight,
  203. fontStyle: FlutterFlowTheme.of(context)
  204. .bodyMedium
  205. .fontStyle,
  206. ),
  207. letterSpacing: 0.0,
  208. fontWeight: FlutterFlowTheme.of(context)
  209. .bodyMedium
  210. .fontWeight,
  211. fontStyle: FlutterFlowTheme.of(context)
  212. .bodyMedium
  213. .fontStyle,
  214. ),
  215. ),
  216. if (widget!.entreetoelichting != null &&
  217. widget!.entreetoelichting != '')
  218. Text(
  219. valueOrDefault<String>(
  220. widget!.entreetoelichting,
  221. 'entreetoelichting',
  222. ),
  223. style: FlutterFlowTheme.of(context).bodyMedium.override(
  224. font: GoogleFonts.inter(
  225. fontWeight: FlutterFlowTheme.of(context)
  226. .bodyMedium
  227. .fontWeight,
  228. fontStyle: FlutterFlowTheme.of(context)
  229. .bodyMedium
  230. .fontStyle,
  231. ),
  232. letterSpacing: 0.0,
  233. fontWeight: FlutterFlowTheme.of(context)
  234. .bodyMedium
  235. .fontWeight,
  236. fontStyle: FlutterFlowTheme.of(context)
  237. .bodyMedium
  238. .fontStyle,
  239. ),
  240. ),
  241. ],
  242. ),
  243. ],
  244. ),
  245. if (widget!.website != null && widget!.website != '')
  246. InkWell(
  247. splashColor: Colors.transparent,
  248. focusColor: Colors.transparent,
  249. hoverColor: Colors.transparent,
  250. highlightColor: Colors.transparent,
  251. onTap: () async {
  252. await launchURL(widget!.website!);
  253. },
  254. child: Text(
  255. valueOrDefault<String>(
  256. widget!.website,
  257. 'website',
  258. ),
  259. style: FlutterFlowTheme.of(context).bodyMedium.override(
  260. font: GoogleFonts.inter(
  261. fontWeight:
  262. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  263. fontStyle:
  264. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  265. ),
  266. letterSpacing: 0.0,
  267. fontWeight:
  268. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  269. fontStyle:
  270. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  271. ),
  272. ),
  273. ),
  274. if (widget!.contact != null && widget!.contact != '')
  275. Text(
  276. valueOrDefault<String>(
  277. widget!.contact,
  278. 'contact',
  279. ),
  280. style: FlutterFlowTheme.of(context).bodyMedium.override(
  281. font: GoogleFonts.inter(
  282. fontWeight:
  283. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  284. fontStyle:
  285. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  286. ),
  287. letterSpacing: 0.0,
  288. fontWeight:
  289. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  290. fontStyle:
  291. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  292. ),
  293. ),
  294. ],
  295. ),
  296. );
  297. }
  298. }