p_uitgaan_page_widget.dart 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. import '/flutter_flow/flutter_flow_ad_banner.dart';
  2. import '/flutter_flow/flutter_flow_icon_button.dart';
  3. import '/flutter_flow/flutter_flow_theme.dart';
  4. import '/flutter_flow/flutter_flow_util.dart';
  5. import '/flutter_flow/flutter_flow_widgets.dart';
  6. import '/shared/drawer_component/drawer_component_widget.dart';
  7. import '/uitgaanspaginas/p_uitgaan_slider_component/p_uitgaan_slider_component_widget.dart';
  8. import '/uitgaanspaginas/uitgaantabel_kaart_component/uitgaantabel_kaart_component_widget.dart';
  9. import 'dart:ui';
  10. import 'package:flutter/material.dart';
  11. import 'package:flutter_spinkit/flutter_spinkit.dart';
  12. import 'package:google_fonts/google_fonts.dart';
  13. import 'package:provider/provider.dart';
  14. import 'p_uitgaan_page_model.dart';
  15. export 'p_uitgaan_page_model.dart';
  16. class PUitgaanPageWidget extends StatefulWidget {
  17. const PUitgaanPageWidget({
  18. super.key,
  19. required this.plaats,
  20. required this.services,
  21. });
  22. final String? plaats;
  23. final String? services;
  24. static String routeName = 'PUitgaanPage';
  25. static String routePath = '/pUitgaanPage';
  26. @override
  27. State<PUitgaanPageWidget> createState() => _PUitgaanPageWidgetState();
  28. }
  29. class _PUitgaanPageWidgetState extends State<PUitgaanPageWidget>
  30. with RouteAware {
  31. late PUitgaanPageModel _model;
  32. final scaffoldKey = GlobalKey<ScaffoldState>();
  33. @override
  34. void initState() {
  35. super.initState();
  36. _model = createModel(context, () => PUitgaanPageModel());
  37. }
  38. @override
  39. void dispose() {
  40. routeObserver.unsubscribe(this);
  41. _model.dispose();
  42. super.dispose();
  43. }
  44. @override
  45. void didUpdateWidget(PUitgaanPageWidget oldWidget) {
  46. super.didUpdateWidget(oldWidget);
  47. _model.widget = widget;
  48. }
  49. @override
  50. void didChangeDependencies() {
  51. super.didChangeDependencies();
  52. final route = DebugModalRoute.of(context);
  53. if (route != null) {
  54. routeObserver.subscribe(this, route);
  55. }
  56. debugLogGlobalProperty(context);
  57. }
  58. @override
  59. void didPopNext() {
  60. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  61. setState(() => _model.isRouteVisible = true);
  62. debugLogWidgetClass(_model);
  63. }
  64. }
  65. @override
  66. void didPush() {
  67. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  68. setState(() => _model.isRouteVisible = true);
  69. debugLogWidgetClass(_model);
  70. }
  71. }
  72. @override
  73. void didPop() {
  74. _model.isRouteVisible = false;
  75. }
  76. @override
  77. void didPushNext() {
  78. _model.isRouteVisible = false;
  79. }
  80. @override
  81. Widget build(BuildContext context) {
  82. DebugFlutterFlowModelContext.maybeOf(context)
  83. ?.parentModelCallback
  84. ?.call(_model);
  85. return GestureDetector(
  86. onTap: () {
  87. FocusScope.of(context).unfocus();
  88. FocusManager.instance.primaryFocus?.unfocus();
  89. },
  90. child: Scaffold(
  91. key: scaffoldKey,
  92. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  93. drawer: Drawer(
  94. elevation: 16.0,
  95. child: wrapWithModel(
  96. model: _model.drawerComponentModel,
  97. updateCallback: () => safeSetState(() {}),
  98. child: Builder(builder: (_) {
  99. return DebugFlutterFlowModelContext(
  100. rootModel: _model.rootModel,
  101. child: DrawerComponentWidget(),
  102. );
  103. }),
  104. ),
  105. ),
  106. appBar: PreferredSize(
  107. preferredSize: Size.fromHeight(80.0),
  108. child: AppBar(
  109. backgroundColor: FlutterFlowTheme.of(context).info,
  110. iconTheme: IconThemeData(color: Color(0xFFB12727)),
  111. automaticallyImplyLeading: false,
  112. actions: [],
  113. flexibleSpace: FlexibleSpaceBar(
  114. title: Align(
  115. alignment: AlignmentDirectional(0.0, 0.0),
  116. child: Row(
  117. mainAxisSize: MainAxisSize.max,
  118. children: [
  119. FlutterFlowIconButton(
  120. borderRadius: 8.0,
  121. buttonSize: 40.0,
  122. fillColor: Color(0xFFB50808),
  123. icon: Icon(
  124. Icons.dehaze_outlined,
  125. color: FlutterFlowTheme.of(context).info,
  126. size: 24.0,
  127. ),
  128. onPressed: () async {
  129. scaffoldKey.currentState!.openDrawer();
  130. },
  131. ),
  132. Padding(
  133. padding:
  134. EdgeInsetsDirectional.fromSTEB(4.0, 0.0, 0.0, 0.0),
  135. child: FlutterFlowIconButton(
  136. borderColor: Color(0x00FF0000),
  137. borderRadius: 30.0,
  138. borderWidth: 1.0,
  139. buttonSize: 50.0,
  140. fillColor: Color(0xFFB50808),
  141. icon: Icon(
  142. Icons.arrow_back_outlined,
  143. color: Colors.white,
  144. size: 30.0,
  145. ),
  146. onPressed: () async {
  147. context.pop();
  148. },
  149. ),
  150. ),
  151. ],
  152. ),
  153. ),
  154. background: Align(
  155. alignment: AlignmentDirectional(0.0, 0.0),
  156. child: Padding(
  157. padding: EdgeInsetsDirectional.fromSTEB(60.0, 0.0, 5.0, 0.0),
  158. child: ClipRRect(
  159. borderRadius: BorderRadius.circular(8.0),
  160. child: Image.asset(
  161. 'assets/images/logo800px.png',
  162. width: () {
  163. if (MediaQuery.sizeOf(context).width <
  164. kBreakpointSmall) {
  165. return 200.0;
  166. } else if (MediaQuery.sizeOf(context).width <
  167. kBreakpointMedium) {
  168. return 250.0;
  169. } else if (MediaQuery.sizeOf(context).width <
  170. kBreakpointLarge) {
  171. return 350.0;
  172. } else {
  173. return 400.0;
  174. }
  175. }(),
  176. fit: BoxFit.fitWidth,
  177. ),
  178. ),
  179. ),
  180. ),
  181. centerTitle: true,
  182. expandedTitleScale: 1.0,
  183. ),
  184. bottom: PreferredSize(
  185. preferredSize: Size.fromHeight(70.0),
  186. child: Container(),
  187. ),
  188. toolbarHeight: MediaQuery.sizeOf(context).height * 0.25,
  189. elevation: 2.0,
  190. ),
  191. ),
  192. body: SingleChildScrollView(
  193. child: Column(
  194. mainAxisSize: MainAxisSize.max,
  195. children: [
  196. wrapWithModel(
  197. model: _model.pUitgaanSliderComponentModel,
  198. updateCallback: () => safeSetState(() {}),
  199. child: Builder(builder: (_) {
  200. return DebugFlutterFlowModelContext(
  201. rootModel: _model.rootModel,
  202. child: PUitgaanSliderComponentWidget(
  203. townid: widget!.plaats,
  204. displayid: widget!.services,
  205. ),
  206. );
  207. }),
  208. ),
  209. Padding(
  210. padding: EdgeInsetsDirectional.fromSTEB(0.0, 15.0, 0.0, 0.0),
  211. child: FlutterFlowAdBanner(
  212. showsTestAd: true,
  213. iOSAdUnitID: 'ca-app-pub-2431417692812232/5511582981',
  214. androidAdUnitID: 'ca-app-pub-2431417692812232/6657143691',
  215. ),
  216. ),
  217. Container(
  218. decoration: BoxDecoration(),
  219. child: wrapWithModel(
  220. model: _model.uitgaantabelKaartComponentModel,
  221. updateCallback: () => safeSetState(() {}),
  222. child: Builder(builder: (_) {
  223. return DebugFlutterFlowModelContext(
  224. rootModel: _model.rootModel,
  225. child: UitgaantabelKaartComponentWidget(
  226. towndid: widget!.plaats!,
  227. displayid: widget!.services!,
  228. ),
  229. );
  230. }),
  231. ),
  232. ),
  233. ],
  234. ),
  235. ),
  236. ),
  237. );
  238. }
  239. }