evenement_info_widget.dart 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  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. 'kslnk9ez' /* Hello Worlddd */,
  171. ),
  172. style: FlutterFlowTheme.of(context).bodyMedium.override(
  173. font: GoogleFonts.inter(
  174. fontWeight:
  175. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  176. fontStyle:
  177. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  178. ),
  179. letterSpacing: 0.0,
  180. fontWeight:
  181. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  182. fontStyle:
  183. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  184. ),
  185. ),
  186. Text(
  187. FFLocalizations.of(context).getText(
  188. 'gpbaiwi9' /* Entree: */,
  189. ),
  190. textAlign: TextAlign.center,
  191. style: FlutterFlowTheme.of(context).headlineLarge.override(
  192. font: GoogleFonts.interTight(
  193. fontWeight: FlutterFlowTheme.of(context)
  194. .headlineLarge
  195. .fontWeight,
  196. fontStyle: FlutterFlowTheme.of(context)
  197. .headlineLarge
  198. .fontStyle,
  199. ),
  200. letterSpacing: 0.0,
  201. fontWeight:
  202. FlutterFlowTheme.of(context).headlineLarge.fontWeight,
  203. fontStyle:
  204. FlutterFlowTheme.of(context).headlineLarge.fontStyle,
  205. ),
  206. ),
  207. Column(
  208. mainAxisSize: MainAxisSize.min,
  209. children: [
  210. if (widget!.entreeprijs != null && widget!.entreeprijs != '')
  211. Text(
  212. valueOrDefault<String>(
  213. widget!.entreeprijs,
  214. 'entreeprijs',
  215. ),
  216. style: FlutterFlowTheme.of(context).bodyMedium.override(
  217. font: GoogleFonts.inter(
  218. fontWeight: FlutterFlowTheme.of(context)
  219. .bodyMedium
  220. .fontWeight,
  221. fontStyle: FlutterFlowTheme.of(context)
  222. .bodyMedium
  223. .fontStyle,
  224. ),
  225. letterSpacing: 0.0,
  226. fontWeight: FlutterFlowTheme.of(context)
  227. .bodyMedium
  228. .fontWeight,
  229. fontStyle: FlutterFlowTheme.of(context)
  230. .bodyMedium
  231. .fontStyle,
  232. ),
  233. ),
  234. if (widget!.entreetoelichting != null &&
  235. widget!.entreetoelichting != '')
  236. Text(
  237. valueOrDefault<String>(
  238. widget!.entreetoelichting,
  239. 'entreetoelichting',
  240. ),
  241. style: FlutterFlowTheme.of(context).bodyMedium.override(
  242. font: GoogleFonts.inter(
  243. fontWeight: FlutterFlowTheme.of(context)
  244. .bodyMedium
  245. .fontWeight,
  246. fontStyle: FlutterFlowTheme.of(context)
  247. .bodyMedium
  248. .fontStyle,
  249. ),
  250. letterSpacing: 0.0,
  251. fontWeight: FlutterFlowTheme.of(context)
  252. .bodyMedium
  253. .fontWeight,
  254. fontStyle: FlutterFlowTheme.of(context)
  255. .bodyMedium
  256. .fontStyle,
  257. ),
  258. ),
  259. ],
  260. ),
  261. ],
  262. ),
  263. InkWell(
  264. splashColor: Colors.transparent,
  265. focusColor: Colors.transparent,
  266. hoverColor: Colors.transparent,
  267. highlightColor: Colors.transparent,
  268. onTap: () async {
  269. await launchURL(widget!.website!);
  270. },
  271. child: Text(
  272. FFLocalizations.of(context).getText(
  273. 'khjv0wcp' /* Website */,
  274. ),
  275. style: FlutterFlowTheme.of(context).bodyMedium.override(
  276. font: GoogleFonts.inter(
  277. fontWeight:
  278. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  279. fontStyle:
  280. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  281. ),
  282. letterSpacing: 0.0,
  283. fontWeight:
  284. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  285. fontStyle:
  286. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  287. ),
  288. ),
  289. ),
  290. if (widget!.contact != null && widget!.contact != '')
  291. Text(
  292. valueOrDefault<String>(
  293. widget!.contact,
  294. 'contact',
  295. ),
  296. style: FlutterFlowTheme.of(context).bodyMedium.override(
  297. font: GoogleFonts.inter(
  298. fontWeight:
  299. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  300. fontStyle:
  301. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  302. ),
  303. letterSpacing: 0.0,
  304. fontWeight:
  305. FlutterFlowTheme.of(context).bodyMedium.fontWeight,
  306. fontStyle:
  307. FlutterFlowTheme.of(context).bodyMedium.fontStyle,
  308. ),
  309. ),
  310. ],
  311. ),
  312. );
  313. }
  314. }