home_copy_widget.dart 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  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_copy_model.dart';
  15. export 'home_copy_model.dart';
  16. class HomeCopyWidget extends StatefulWidget {
  17. const HomeCopyWidget({super.key});
  18. static String routeName = 'homeCopy';
  19. static String routePath = '/homeCopy';
  20. @override
  21. State<HomeCopyWidget> createState() => _HomeCopyWidgetState();
  22. }
  23. class _HomeCopyWidgetState extends State<HomeCopyWidget>
  24. with TickerProviderStateMixin, RouteAware {
  25. late HomeCopyModel _model;
  26. final scaffoldKey = GlobalKey<ScaffoldState>();
  27. @override
  28. void initState() {
  29. super.initState();
  30. _model = createModel(context, () => HomeCopyModel());
  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(HomeCopyWidget 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(50.0),
  111. child: AppBar(
  112. backgroundColor: Color(0xFF3E454C),
  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. border: Border.all(
  173. width: 0.0,
  174. ),
  175. ),
  176. child: wrapWithModel(
  177. model: _model.homeUitgaanSliderComponentModel,
  178. updateCallback: () => safeSetState(() {}),
  179. child: Builder(builder: (_) {
  180. return DebugFlutterFlowModelContext(
  181. rootModel: _model.rootModel,
  182. child: HomeUitgaanSliderComponentWidget(
  183. displayid: 'services_1',
  184. ),
  185. );
  186. }),
  187. ),
  188. ),
  189. ),
  190. Expanded(
  191. child: Column(
  192. children: [
  193. Align(
  194. alignment: Alignment(0.0, 0),
  195. child: TabBar(
  196. isScrollable: true,
  197. tabAlignment: TabAlignment.center,
  198. labelColor: FlutterFlowTheme.of(context).primaryText,
  199. unselectedLabelColor:
  200. FlutterFlowTheme.of(context).secondaryText,
  201. labelStyle:
  202. FlutterFlowTheme.of(context).titleMedium.override(
  203. font: GoogleFonts.roboto(
  204. fontWeight: FlutterFlowTheme.of(context)
  205. .titleMedium
  206. .fontWeight,
  207. fontStyle: FlutterFlowTheme.of(context)
  208. .titleMedium
  209. .fontStyle,
  210. ),
  211. letterSpacing: 0.0,
  212. fontWeight: FlutterFlowTheme.of(context)
  213. .titleMedium
  214. .fontWeight,
  215. fontStyle: FlutterFlowTheme.of(context)
  216. .titleMedium
  217. .fontStyle,
  218. ),
  219. unselectedLabelStyle:
  220. FlutterFlowTheme.of(context).titleMedium.override(
  221. font: GoogleFonts.roboto(
  222. fontWeight: FlutterFlowTheme.of(context)
  223. .titleMedium
  224. .fontWeight,
  225. fontStyle: FlutterFlowTheme.of(context)
  226. .titleMedium
  227. .fontStyle,
  228. ),
  229. letterSpacing: 0.0,
  230. fontWeight: FlutterFlowTheme.of(context)
  231. .titleMedium
  232. .fontWeight,
  233. fontStyle: FlutterFlowTheme.of(context)
  234. .titleMedium
  235. .fontStyle,
  236. ),
  237. indicatorColor: FlutterFlowTheme.of(context).secondary,
  238. tabs: [
  239. Tab(
  240. text: FFLocalizations.of(context).getText(
  241. 'l7r0djaf' /* Uitgaan */,
  242. ),
  243. ),
  244. Tab(
  245. text: FFLocalizations.of(context).getText(
  246. 'jegwuc6g' /* Activiteiten */,
  247. ),
  248. ),
  249. Tab(
  250. text: FFLocalizations.of(context).getText(
  251. '8fahztli' /* Cultuur */,
  252. ),
  253. ),
  254. Tab(
  255. text: FFLocalizations.of(context).getText(
  256. 'p85c5ps2' /* Films */,
  257. ),
  258. ),
  259. Tab(
  260. text: FFLocalizations.of(context).getText(
  261. '4z239l94' /* Jeugd */,
  262. ),
  263. ),
  264. ],
  265. controller: _model.tabBarController,
  266. onTap: (i) async {
  267. [
  268. () async {},
  269. () async {
  270. _model.tabActiviteitenGeladen = true;
  271. safeSetState(() {});
  272. },
  273. () async {
  274. _model.tabCultuurGeladen = true;
  275. safeSetState(() {});
  276. },
  277. () async {
  278. _model.tabFilmsGeladen = true;
  279. safeSetState(() {});
  280. },
  281. () async {
  282. _model.tabJeugdGeladen = true;
  283. safeSetState(() {});
  284. }
  285. ][i]();
  286. },
  287. ),
  288. ),
  289. Expanded(
  290. child: TabBarView(
  291. controller: _model.tabBarController,
  292. children: [
  293. SingleChildScrollView(
  294. child: Column(
  295. mainAxisSize: MainAxisSize.max,
  296. children: [
  297. wrapWithModel(
  298. model: _model
  299. .homeUitgaantabelKaartComponentModel1,
  300. updateCallback: () => safeSetState(() {}),
  301. child: Builder(builder: (_) {
  302. return DebugFlutterFlowModelContext(
  303. rootModel: _model.rootModel,
  304. child:
  305. HomeUitgaantabelKaartComponentWidget(
  306. displayid: 'services_3',
  307. ),
  308. );
  309. }),
  310. ),
  311. ],
  312. ),
  313. ),
  314. Builder(
  315. builder: (context) {
  316. if (_model.tabActiviteitenGeladen) {
  317. return SingleChildScrollView(
  318. child: Column(
  319. mainAxisSize: MainAxisSize.max,
  320. children: [
  321. wrapWithModel(
  322. model: _model
  323. .homeUitgaantabelKaartComponentModel2,
  324. updateCallback: () =>
  325. safeSetState(() {}),
  326. child: Builder(builder: (_) {
  327. return DebugFlutterFlowModelContext(
  328. rootModel: _model.rootModel,
  329. child:
  330. HomeUitgaantabelKaartComponentWidget(
  331. displayid: 'services_4',
  332. ),
  333. );
  334. }),
  335. ),
  336. ],
  337. ),
  338. );
  339. } else {
  340. return Container(
  341. width: 100.0,
  342. height: 100.0,
  343. decoration: BoxDecoration(
  344. color: FlutterFlowTheme.of(context)
  345. .secondaryBackground,
  346. ),
  347. );
  348. }
  349. },
  350. ),
  351. Builder(
  352. builder: (context) {
  353. if (_model.tabCultuurGeladen) {
  354. return SingleChildScrollView(
  355. child: Column(
  356. mainAxisSize: MainAxisSize.max,
  357. children: [
  358. wrapWithModel(
  359. model: _model
  360. .homeUitgaantabelKaartComponentModel3,
  361. updateCallback: () =>
  362. safeSetState(() {}),
  363. child: Builder(builder: (_) {
  364. return DebugFlutterFlowModelContext(
  365. rootModel: _model.rootModel,
  366. child:
  367. HomeUitgaantabelKaartComponentWidget(
  368. displayid: 'services_5',
  369. ),
  370. );
  371. }),
  372. ),
  373. ],
  374. ),
  375. );
  376. } else {
  377. return Container(
  378. width: 100.0,
  379. height: 100.0,
  380. decoration: BoxDecoration(
  381. color: FlutterFlowTheme.of(context)
  382. .secondaryBackground,
  383. ),
  384. );
  385. }
  386. },
  387. ),
  388. Builder(
  389. builder: (context) {
  390. if (_model.tabFilmsGeladen) {
  391. return SingleChildScrollView(
  392. child: Column(
  393. mainAxisSize: MainAxisSize.max,
  394. children: [
  395. wrapWithModel(
  396. model: _model
  397. .homeUitgaantabelKaartComponentModel4,
  398. updateCallback: () =>
  399. safeSetState(() {}),
  400. child: Builder(builder: (_) {
  401. return DebugFlutterFlowModelContext(
  402. rootModel: _model.rootModel,
  403. child:
  404. HomeUitgaantabelKaartComponentWidget(
  405. displayid: 'services_6',
  406. ),
  407. );
  408. }),
  409. ),
  410. ],
  411. ),
  412. );
  413. } else {
  414. return Container(
  415. width: 100.0,
  416. height: 100.0,
  417. decoration: BoxDecoration(
  418. color: FlutterFlowTheme.of(context)
  419. .secondaryBackground,
  420. ),
  421. );
  422. }
  423. },
  424. ),
  425. Builder(
  426. builder: (context) {
  427. if (_model.tabJeugdGeladen) {
  428. return SingleChildScrollView(
  429. child: Column(
  430. mainAxisSize: MainAxisSize.max,
  431. children: [
  432. wrapWithModel(
  433. model: _model
  434. .homeUitgaantabelKaartComponentModel5,
  435. updateCallback: () =>
  436. safeSetState(() {}),
  437. child: Builder(builder: (_) {
  438. return DebugFlutterFlowModelContext(
  439. rootModel: _model.rootModel,
  440. child:
  441. HomeUitgaantabelKaartComponentWidget(
  442. displayid: 'services_7',
  443. ),
  444. );
  445. }),
  446. ),
  447. ],
  448. ),
  449. );
  450. } else {
  451. return Container(
  452. width: 100.0,
  453. height: 100.0,
  454. decoration: BoxDecoration(
  455. color: FlutterFlowTheme.of(context)
  456. .secondaryBackground,
  457. ),
  458. );
  459. }
  460. },
  461. ),
  462. ],
  463. ),
  464. ),
  465. ],
  466. ),
  467. ),
  468. ],
  469. ),
  470. ),
  471. ),
  472. );
  473. }
  474. }