home_widget.dart 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  1. import '/components/header_buttons_component_widget.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/home_uitgaan_slider_component/home_uitgaan_slider_component_widget.dart';
  8. import '/uitgaanspaginas/home_uitgaantabel_kaart_component/home_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 'home_model.dart';
  15. export 'home_model.dart';
  16. class HomeWidget extends StatefulWidget {
  17. const HomeWidget({super.key});
  18. static String routeName = 'home';
  19. static String routePath = '/home';
  20. @override
  21. State<HomeWidget> createState() => _HomeWidgetState();
  22. }
  23. class _HomeWidgetState extends State<HomeWidget>
  24. with TickerProviderStateMixin, RouteAware {
  25. late HomeModel _model;
  26. final scaffoldKey = GlobalKey<ScaffoldState>();
  27. @override
  28. void initState() {
  29. super.initState();
  30. _model = createModel(context, () => HomeModel());
  31. _model.tabBarController = TabController(
  32. vsync: this,
  33. length: 5,
  34. initialIndex: 0,
  35. )
  36. ..addListener(() => safeSetState(() {}))
  37. ..addListener(() {
  38. debugLogWidgetClass(_model);
  39. });
  40. }
  41. @override
  42. void dispose() {
  43. routeObserver.unsubscribe(this);
  44. _model.dispose();
  45. super.dispose();
  46. }
  47. @override
  48. void didUpdateWidget(HomeWidget oldWidget) {
  49. super.didUpdateWidget(oldWidget);
  50. _model.widget = widget;
  51. }
  52. @override
  53. void didChangeDependencies() {
  54. super.didChangeDependencies();
  55. final route = DebugModalRoute.of(context);
  56. if (route != null) {
  57. routeObserver.subscribe(this, route);
  58. }
  59. debugLogGlobalProperty(context);
  60. }
  61. @override
  62. void didPopNext() {
  63. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  64. setState(() => _model.isRouteVisible = true);
  65. debugLogWidgetClass(_model);
  66. }
  67. }
  68. @override
  69. void didPush() {
  70. if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
  71. setState(() => _model.isRouteVisible = true);
  72. debugLogWidgetClass(_model);
  73. }
  74. }
  75. @override
  76. void didPop() {
  77. _model.isRouteVisible = false;
  78. }
  79. @override
  80. void didPushNext() {
  81. _model.isRouteVisible = false;
  82. }
  83. @override
  84. Widget build(BuildContext context) {
  85. DebugFlutterFlowModelContext.maybeOf(context)
  86. ?.parentModelCallback
  87. ?.call(_model);
  88. return GestureDetector(
  89. onTap: () {
  90. FocusScope.of(context).unfocus();
  91. FocusManager.instance.primaryFocus?.unfocus();
  92. },
  93. child: Scaffold(
  94. key: scaffoldKey,
  95. backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
  96. drawer: Drawer(
  97. elevation: 16.0,
  98. child: wrapWithModel(
  99. model: _model.drawerComponentModel,
  100. updateCallback: () => safeSetState(() {}),
  101. child: Builder(builder: (_) {
  102. return DebugFlutterFlowModelContext(
  103. rootModel: _model.rootModel,
  104. child: DrawerComponentWidget(),
  105. );
  106. }),
  107. ),
  108. ),
  109. appBar: PreferredSize(
  110. preferredSize: Size.fromHeight(80.0),
  111. child: AppBar(
  112. backgroundColor: FlutterFlowTheme.of(context).info,
  113. iconTheme: IconThemeData(color: Color(0xFFB12727)),
  114. automaticallyImplyLeading: false,
  115. actions: [],
  116. flexibleSpace: FlexibleSpaceBar(
  117. title: Align(
  118. alignment: AlignmentDirectional(0.0, 0.0),
  119. child: Row(
  120. mainAxisSize: MainAxisSize.max,
  121. children: [
  122. FlutterFlowIconButton(
  123. borderRadius: 8.0,
  124. buttonSize: 40.0,
  125. fillColor: Color(0xFFB50808),
  126. icon: Icon(
  127. Icons.dehaze_outlined,
  128. color: FlutterFlowTheme.of(context).info,
  129. size: 24.0,
  130. ),
  131. onPressed: () async {
  132. scaffoldKey.currentState!.openDrawer();
  133. },
  134. ),
  135. ],
  136. ),
  137. ),
  138. background: wrapWithModel(
  139. model: _model.headerButtonsComponentModel,
  140. updateCallback: () => safeSetState(() {}),
  141. child: Builder(builder: (_) {
  142. return DebugFlutterFlowModelContext(
  143. rootModel: _model.rootModel,
  144. child: HeaderButtonsComponentWidget(
  145. showBackButton: false,
  146. ),
  147. );
  148. }),
  149. ),
  150. centerTitle: true,
  151. expandedTitleScale: 1.0,
  152. ),
  153. bottom: PreferredSize(
  154. preferredSize: Size.fromHeight(70.0),
  155. child: Container(),
  156. ),
  157. toolbarHeight: MediaQuery.sizeOf(context).height * 0.25,
  158. elevation: 2.0,
  159. ),
  160. ),
  161. body: SafeArea(
  162. top: true,
  163. child: Column(
  164. mainAxisSize: MainAxisSize.max,
  165. children: [
  166. Material(
  167. color: Colors.transparent,
  168. elevation: 2.0,
  169. child: Container(
  170. height: 250.0,
  171. decoration: BoxDecoration(
  172. color: Color(0xFFF5A2A2),
  173. border: Border.all(
  174. color: Color(0xFFCAC3C3),
  175. width: 2.0,
  176. ),
  177. ),
  178. child: wrapWithModel(
  179. model: _model.homeUitgaanSliderComponentModel,
  180. updateCallback: () => safeSetState(() {}),
  181. child: Builder(builder: (_) {
  182. return DebugFlutterFlowModelContext(
  183. rootModel: _model.rootModel,
  184. child: HomeUitgaanSliderComponentWidget(
  185. displayid: 'services_1',
  186. ),
  187. );
  188. }),
  189. ),
  190. ),
  191. ),
  192. Expanded(
  193. child: Column(
  194. children: [
  195. Align(
  196. alignment: Alignment(0.0, 0),
  197. child: TabBar(
  198. isScrollable: true,
  199. tabAlignment: TabAlignment.center,
  200. labelColor: FlutterFlowTheme.of(context).primaryText,
  201. unselectedLabelColor:
  202. FlutterFlowTheme.of(context).secondaryText,
  203. labelStyle:
  204. FlutterFlowTheme.of(context).titleMedium.override(
  205. font: GoogleFonts.interTight(
  206. fontWeight: FlutterFlowTheme.of(context)
  207. .titleMedium
  208. .fontWeight,
  209. fontStyle: FlutterFlowTheme.of(context)
  210. .titleMedium
  211. .fontStyle,
  212. ),
  213. letterSpacing: 0.0,
  214. fontWeight: FlutterFlowTheme.of(context)
  215. .titleMedium
  216. .fontWeight,
  217. fontStyle: FlutterFlowTheme.of(context)
  218. .titleMedium
  219. .fontStyle,
  220. ),
  221. unselectedLabelStyle:
  222. FlutterFlowTheme.of(context).titleMedium.override(
  223. font: GoogleFonts.interTight(
  224. fontWeight: FlutterFlowTheme.of(context)
  225. .titleMedium
  226. .fontWeight,
  227. fontStyle: FlutterFlowTheme.of(context)
  228. .titleMedium
  229. .fontStyle,
  230. ),
  231. letterSpacing: 0.0,
  232. fontWeight: FlutterFlowTheme.of(context)
  233. .titleMedium
  234. .fontWeight,
  235. fontStyle: FlutterFlowTheme.of(context)
  236. .titleMedium
  237. .fontStyle,
  238. ),
  239. indicatorColor: FlutterFlowTheme.of(context).primary,
  240. tabs: [
  241. Tab(
  242. text: FFLocalizations.of(context).getText(
  243. 'eor4c9rz' /* Uitgaan */,
  244. ),
  245. ),
  246. Tab(
  247. text: FFLocalizations.of(context).getText(
  248. 'mx7sn4ne' /* Activiteiten */,
  249. ),
  250. ),
  251. Tab(
  252. text: FFLocalizations.of(context).getText(
  253. 'e6xyyt74' /* Cultuur */,
  254. ),
  255. ),
  256. Tab(
  257. text: FFLocalizations.of(context).getText(
  258. 'uxy2nfok' /* Films */,
  259. ),
  260. ),
  261. Tab(
  262. text: FFLocalizations.of(context).getText(
  263. 'lx77xfrn' /* Jeugd */,
  264. ),
  265. ),
  266. ],
  267. controller: _model.tabBarController,
  268. onTap: (i) async {
  269. [
  270. () async {},
  271. () async {},
  272. () async {},
  273. () async {},
  274. () async {}
  275. ][i]();
  276. },
  277. ),
  278. ),
  279. Expanded(
  280. child: TabBarView(
  281. controller: _model.tabBarController,
  282. children: [
  283. SingleChildScrollView(
  284. child: Column(
  285. mainAxisSize: MainAxisSize.max,
  286. children: [
  287. wrapWithModel(
  288. model: _model
  289. .homeUitgaantabelKaartComponentModel1,
  290. updateCallback: () => safeSetState(() {}),
  291. child: Builder(builder: (_) {
  292. return DebugFlutterFlowModelContext(
  293. rootModel: _model.rootModel,
  294. child:
  295. HomeUitgaantabelKaartComponentWidget(
  296. displayid: 'services_3',
  297. ),
  298. );
  299. }),
  300. ),
  301. ],
  302. ),
  303. ),
  304. SingleChildScrollView(
  305. child: Column(
  306. mainAxisSize: MainAxisSize.max,
  307. children: [
  308. wrapWithModel(
  309. model: _model
  310. .homeUitgaantabelKaartComponentModel2,
  311. updateCallback: () => safeSetState(() {}),
  312. child: Builder(builder: (_) {
  313. return DebugFlutterFlowModelContext(
  314. rootModel: _model.rootModel,
  315. child:
  316. HomeUitgaantabelKaartComponentWidget(
  317. displayid: 'services_4',
  318. ),
  319. );
  320. }),
  321. ),
  322. ],
  323. ),
  324. ),
  325. SingleChildScrollView(
  326. child: Column(
  327. mainAxisSize: MainAxisSize.max,
  328. children: [
  329. wrapWithModel(
  330. model: _model
  331. .homeUitgaantabelKaartComponentModel3,
  332. updateCallback: () => safeSetState(() {}),
  333. child: Builder(builder: (_) {
  334. return DebugFlutterFlowModelContext(
  335. rootModel: _model.rootModel,
  336. child:
  337. HomeUitgaantabelKaartComponentWidget(
  338. displayid: 'services_5',
  339. ),
  340. );
  341. }),
  342. ),
  343. ],
  344. ),
  345. ),
  346. SingleChildScrollView(
  347. child: Column(
  348. mainAxisSize: MainAxisSize.max,
  349. children: [
  350. wrapWithModel(
  351. model: _model
  352. .homeUitgaantabelKaartComponentModel4,
  353. updateCallback: () => safeSetState(() {}),
  354. child: Builder(builder: (_) {
  355. return DebugFlutterFlowModelContext(
  356. rootModel: _model.rootModel,
  357. child:
  358. HomeUitgaantabelKaartComponentWidget(
  359. displayid: 'services_6',
  360. ),
  361. );
  362. }),
  363. ),
  364. ],
  365. ),
  366. ),
  367. SingleChildScrollView(
  368. child: Column(
  369. mainAxisSize: MainAxisSize.max,
  370. children: [
  371. wrapWithModel(
  372. model: _model
  373. .homeUitgaantabelKaartComponentModel5,
  374. updateCallback: () => safeSetState(() {}),
  375. child: Builder(builder: (_) {
  376. return DebugFlutterFlowModelContext(
  377. rootModel: _model.rootModel,
  378. child:
  379. HomeUitgaantabelKaartComponentWidget(
  380. displayid: 'services_7',
  381. ),
  382. );
  383. }),
  384. ),
  385. ],
  386. ),
  387. ),
  388. ],
  389. ),
  390. ),
  391. ],
  392. ),
  393. ),
  394. ],
  395. ),
  396. ),
  397. ),
  398. );
  399. }
  400. }