| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494 |
- import '/components/header_buttons_component_widget.dart';
- import '/flutter_flow/flutter_flow_icon_button.dart';
- import '/flutter_flow/flutter_flow_theme.dart';
- import '/flutter_flow/flutter_flow_util.dart';
- import '/flutter_flow/flutter_flow_widgets.dart';
- import '/shared/drawer_component/drawer_component_widget.dart';
- import '/uitgaanspaginas/home_uitgaan_slider_component/home_uitgaan_slider_component_widget.dart';
- import '/uitgaanspaginas/home_uitgaantabel_kaart_component/home_uitgaantabel_kaart_component_widget.dart';
- import 'dart:ui';
- import 'package:flutter/material.dart';
- import 'package:flutter_spinkit/flutter_spinkit.dart';
- import 'package:google_fonts/google_fonts.dart';
- import 'package:provider/provider.dart';
- import 'home_model.dart';
- export 'home_model.dart';
- class HomeWidget extends StatefulWidget {
- const HomeWidget({super.key});
- static String routeName = 'home';
- static String routePath = '/home';
- @override
- State<HomeWidget> createState() => _HomeWidgetState();
- }
- class _HomeWidgetState extends State<HomeWidget>
- with TickerProviderStateMixin, RouteAware {
- late HomeModel _model;
- final scaffoldKey = GlobalKey<ScaffoldState>();
- @override
- void initState() {
- super.initState();
- _model = createModel(context, () => HomeModel());
- _model.tabBarController = TabController(
- vsync: this,
- length: 5,
- initialIndex: 0,
- )
- ..addListener(() => safeSetState(() {}))
- ..addListener(() {
- debugLogWidgetClass(_model);
- });
- }
- @override
- void dispose() {
- routeObserver.unsubscribe(this);
- _model.dispose();
- super.dispose();
- }
- @override
- void didUpdateWidget(HomeWidget oldWidget) {
- super.didUpdateWidget(oldWidget);
- _model.widget = widget;
- }
- @override
- void didChangeDependencies() {
- super.didChangeDependencies();
- final route = DebugModalRoute.of(context);
- if (route != null) {
- routeObserver.subscribe(this, route);
- }
- debugLogGlobalProperty(context);
- }
- @override
- void didPopNext() {
- if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
- setState(() => _model.isRouteVisible = true);
- debugLogWidgetClass(_model);
- }
- }
- @override
- void didPush() {
- if (mounted && DebugFlutterFlowModelContext.maybeOf(context) == null) {
- setState(() => _model.isRouteVisible = true);
- debugLogWidgetClass(_model);
- }
- }
- @override
- void didPop() {
- _model.isRouteVisible = false;
- }
- @override
- void didPushNext() {
- _model.isRouteVisible = false;
- }
- @override
- Widget build(BuildContext context) {
- DebugFlutterFlowModelContext.maybeOf(context)
- ?.parentModelCallback
- ?.call(_model);
- return GestureDetector(
- onTap: () {
- FocusScope.of(context).unfocus();
- FocusManager.instance.primaryFocus?.unfocus();
- },
- child: Scaffold(
- key: scaffoldKey,
- backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
- drawer: Drawer(
- elevation: 16.0,
- child: wrapWithModel(
- model: _model.drawerComponentModel,
- updateCallback: () => safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child: DrawerComponentWidget(),
- );
- }),
- ),
- ),
- appBar: PreferredSize(
- preferredSize: Size.fromHeight(50.0),
- child: AppBar(
- backgroundColor: Color(0xFF3E454C),
- iconTheme: IconThemeData(color: Color(0xFFB12727)),
- automaticallyImplyLeading: false,
- actions: [],
- flexibleSpace: FlexibleSpaceBar(
- title: Align(
- alignment: AlignmentDirectional(0.0, 0.0),
- child: Row(
- mainAxisSize: MainAxisSize.max,
- children: [
- FlutterFlowIconButton(
- borderRadius: 8.0,
- buttonSize: 40.0,
- fillColor: Color(0xFFB50808),
- icon: Icon(
- Icons.dehaze_outlined,
- color: FlutterFlowTheme.of(context).info,
- size: 24.0,
- ),
- onPressed: () async {
- scaffoldKey.currentState!.openDrawer();
- },
- ),
- ],
- ),
- ),
- background: wrapWithModel(
- model: _model.headerButtonsComponentModel,
- updateCallback: () => safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child: HeaderButtonsComponentWidget(
- showBackButton: false,
- ),
- );
- }),
- ),
- centerTitle: true,
- expandedTitleScale: 1.0,
- ),
- bottom: PreferredSize(
- preferredSize: Size.fromHeight(70.0),
- child: Container(),
- ),
- toolbarHeight: MediaQuery.sizeOf(context).height * 0.25,
- elevation: 2.0,
- ),
- ),
- body: SafeArea(
- top: true,
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- Material(
- color: Colors.transparent,
- elevation: 2.0,
- child: Container(
- height: 250.0,
- decoration: BoxDecoration(
- color: Color(0xFFF5A2A2),
- border: Border.all(
- color: Color(0xFFCAC3C3),
- width: 2.0,
- ),
- ),
- child: wrapWithModel(
- model: _model.homeUitgaanSliderComponentModel,
- updateCallback: () => safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child: HomeUitgaanSliderComponentWidget(
- displayid: 'services_1',
- ),
- );
- }),
- ),
- ),
- ),
- Expanded(
- child: Column(
- children: [
- Align(
- alignment: Alignment(0.0, 0),
- child: TabBar(
- isScrollable: true,
- tabAlignment: TabAlignment.center,
- labelColor: FlutterFlowTheme.of(context).primaryText,
- unselectedLabelColor:
- FlutterFlowTheme.of(context).secondaryText,
- labelStyle:
- FlutterFlowTheme.of(context).titleMedium.override(
- font: GoogleFonts.interTight(
- fontWeight: FlutterFlowTheme.of(context)
- .titleMedium
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .titleMedium
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight: FlutterFlowTheme.of(context)
- .titleMedium
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .titleMedium
- .fontStyle,
- ),
- unselectedLabelStyle:
- FlutterFlowTheme.of(context).titleMedium.override(
- font: GoogleFonts.interTight(
- fontWeight: FlutterFlowTheme.of(context)
- .titleMedium
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .titleMedium
- .fontStyle,
- ),
- letterSpacing: 0.0,
- fontWeight: FlutterFlowTheme.of(context)
- .titleMedium
- .fontWeight,
- fontStyle: FlutterFlowTheme.of(context)
- .titleMedium
- .fontStyle,
- ),
- indicatorColor: FlutterFlowTheme.of(context).primary,
- tabs: [
- Tab(
- text: FFLocalizations.of(context).getText(
- 'eor4c9rz' /* Uitgaan */,
- ),
- ),
- Tab(
- text: FFLocalizations.of(context).getText(
- 'mx7sn4ne' /* Activiteiten */,
- ),
- ),
- Tab(
- text: FFLocalizations.of(context).getText(
- 'e6xyyt74' /* Cultuur */,
- ),
- ),
- Tab(
- text: FFLocalizations.of(context).getText(
- 'uxy2nfok' /* Films */,
- ),
- ),
- Tab(
- text: FFLocalizations.of(context).getText(
- 'lx77xfrn' /* Jeugd */,
- ),
- ),
- ],
- controller: _model.tabBarController,
- onTap: (i) async {
- [
- () async {},
- () async {
- _model.tabActiviteitenGeladen = true;
- safeSetState(() {});
- },
- () async {
- _model.tabCultuurGeladen = true;
- safeSetState(() {});
- },
- () async {
- _model.tabFilmsGeladen = true;
- safeSetState(() {});
- },
- () async {
- _model.tabJeugdGeladen = true;
- safeSetState(() {});
- }
- ][i]();
- },
- ),
- ),
- Expanded(
- child: TabBarView(
- controller: _model.tabBarController,
- children: [
- SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- wrapWithModel(
- model: _model
- .homeUitgaantabelKaartComponentModel1,
- updateCallback: () => safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child:
- HomeUitgaantabelKaartComponentWidget(
- displayid: 'services_3',
- ),
- );
- }),
- ),
- ],
- ),
- ),
- Builder(
- builder: (context) {
- if (_model.tabActiviteitenGeladen) {
- return SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- wrapWithModel(
- model: _model
- .homeUitgaantabelKaartComponentModel2,
- updateCallback: () =>
- safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child:
- HomeUitgaantabelKaartComponentWidget(
- displayid: 'services_4',
- ),
- );
- }),
- ),
- ],
- ),
- );
- } else {
- return Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .secondaryBackground,
- ),
- );
- }
- },
- ),
- Builder(
- builder: (context) {
- if (_model.tabCultuurGeladen) {
- return SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- wrapWithModel(
- model: _model
- .homeUitgaantabelKaartComponentModel3,
- updateCallback: () =>
- safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child:
- HomeUitgaantabelKaartComponentWidget(
- displayid: 'services_5',
- ),
- );
- }),
- ),
- ],
- ),
- );
- } else {
- return Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .secondaryBackground,
- ),
- );
- }
- },
- ),
- Builder(
- builder: (context) {
- if (_model.tabFilmsGeladen) {
- return SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- wrapWithModel(
- model: _model
- .homeUitgaantabelKaartComponentModel4,
- updateCallback: () =>
- safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child:
- HomeUitgaantabelKaartComponentWidget(
- displayid: 'services_6',
- ),
- );
- }),
- ),
- ],
- ),
- );
- } else {
- return Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .secondaryBackground,
- ),
- );
- }
- },
- ),
- Builder(
- builder: (context) {
- if (_model.tabJeugdGeladen) {
- return SingleChildScrollView(
- child: Column(
- mainAxisSize: MainAxisSize.max,
- children: [
- wrapWithModel(
- model: _model
- .homeUitgaantabelKaartComponentModel5,
- updateCallback: () =>
- safeSetState(() {}),
- child: Builder(builder: (_) {
- return DebugFlutterFlowModelContext(
- rootModel: _model.rootModel,
- child:
- HomeUitgaantabelKaartComponentWidget(
- displayid: 'services_7',
- ),
- );
- }),
- ),
- ],
- ),
- );
- } else {
- return Container(
- width: 100.0,
- height: 100.0,
- decoration: BoxDecoration(
- color: FlutterFlowTheme.of(context)
- .secondaryBackground,
- ),
- );
- }
- },
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ),
- );
- }
- }
|