|
@@ -0,0 +1,515 @@
|
|
|
|
|
+import '/backend/api_requests/api_calls.dart';
|
|
|
|
|
+import '/backend/api_requests/api_streaming.dart';
|
|
|
|
|
+import '/backend/schema/structs/index.dart';
|
|
|
|
|
+import '/flutter_flow/flutter_flow_drop_down.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 '/flutter_flow/form_field_controller.dart';
|
|
|
|
|
+import 'dart:convert';
|
|
|
|
|
+import 'dart:ui';
|
|
|
|
|
+import '/custom_code/actions/index.dart' as actions;
|
|
|
|
|
+import '/flutter_flow/custom_functions.dart' as functions;
|
|
|
|
|
+import '/index.dart';
|
|
|
|
|
+import 'package:flutter/material.dart';
|
|
|
|
|
+import 'package:flutter/scheduler.dart';
|
|
|
|
|
+import 'package:flutter_spinkit/flutter_spinkit.dart';
|
|
|
|
|
+import 'package:google_fonts/google_fonts.dart';
|
|
|
|
|
+import 'package:provider/provider.dart';
|
|
|
|
|
+import 'kanwaeg_select_state_drop_down_component_copy_model.dart';
|
|
|
|
|
+export 'kanwaeg_select_state_drop_down_component_copy_model.dart';
|
|
|
|
|
+
|
|
|
|
|
+class KanwaegSelectStateDropDownComponentCopyWidget extends StatefulWidget {
|
|
|
|
|
+ const KanwaegSelectStateDropDownComponentCopyWidget({super.key});
|
|
|
|
|
+
|
|
|
|
|
+ @override
|
|
|
|
|
+ State<KanwaegSelectStateDropDownComponentCopyWidget> createState() =>
|
|
|
|
|
+ _KanwaegSelectStateDropDownComponentCopyWidgetState();
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+class _KanwaegSelectStateDropDownComponentCopyWidgetState
|
|
|
|
|
+ extends State<KanwaegSelectStateDropDownComponentCopyWidget>
|
|
|
|
|
+ with RouteAware {
|
|
|
|
|
+ late KanwaegSelectStateDropDownComponentCopyModel _model;
|
|
|
|
|
+
|
|
|
|
|
+ @override
|
|
|
|
|
+ void setState(VoidCallback callback) {
|
|
|
|
|
+ super.setState(callback);
|
|
|
|
|
+ _model.onUpdate();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @override
|
|
|
|
|
+ void initState() {
|
|
|
|
|
+ super.initState();
|
|
|
|
|
+ _model = createModel(
|
|
|
|
|
+ context, () => KanwaegSelectStateDropDownComponentCopyModel());
|
|
|
|
|
+
|
|
|
|
|
+ // On component load action.
|
|
|
|
|
+ SchedulerBinding.instance.addPostFrameCallback((_) async {
|
|
|
|
|
+ _model.isLoadingProvinciesDone = false;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ if (!(FFAppState().provincieSelectId != null &&
|
|
|
|
|
+ FFAppState().provincieSelectId != '')) {
|
|
|
|
|
+ FFAppState().provincieSelectId = '28666';
|
|
|
|
|
+ FFAppState().provincieSelectName = 'Noord-Holland';
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!(FFAppState().gemeenteSelectId != null &&
|
|
|
|
|
+ FFAppState().gemeenteSelectId != '')) {
|
|
|
|
|
+ FFAppState().gemeenteSelectId = '28694';
|
|
|
|
|
+ FFAppState().gemeenteSelectNaam = 'Amsterdam (gemeente)';
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ }
|
|
|
|
|
+ _model.apiProvincieResults = await ProvinciesCall.call();
|
|
|
|
|
+
|
|
|
|
|
+ if ((_model.apiProvincieResults?.succeeded ?? true)) {
|
|
|
|
|
+ FFAppState().provincielijst = ((_model.apiProvincieResults?.jsonBody ??
|
|
|
|
|
+ '')
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .map<ProvincieModelStruct?>(ProvincieModelStruct.maybeFromMap)
|
|
|
|
|
+ .toList() as Iterable<ProvincieModelStruct?>)
|
|
|
|
|
+ .withoutNulls
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .cast<ProvincieModelStruct>();
|
|
|
|
|
+ FFAppState().update(() {});
|
|
|
|
|
+ } else {
|
|
|
|
|
+ FFAppState().deleteProvincielijst();
|
|
|
|
|
+ FFAppState().provincielijst = [];
|
|
|
|
|
+
|
|
|
|
|
+ FFAppState().update(() {});
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ _model.isLoadingProvinciesDone = true;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ if (!(FFAppState().provincieSelectId != null &&
|
|
|
|
|
+ FFAppState().provincieSelectId != '')) {
|
|
|
|
|
+ _model.isLoadingProvinciesDone = true;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ }
|
|
|
|
|
+ if (FFAppState().gemeenteSelectId != null &&
|
|
|
|
|
+ FFAppState().gemeenteSelectId != '') {
|
|
|
|
|
+ _model.apiGemeenteResultInitalize = await GemeentenCall.call(
|
|
|
|
|
+ provincieid: FFAppState().provincieSelectId,
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ FFAppState().gemeentelijst =
|
|
|
|
|
+ ((_model.apiGemeenteResultInitalize?.jsonBody ?? '')
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .map<GemeenteModelStruct?>(GemeenteModelStruct.maybeFromMap)
|
|
|
|
|
+ .toList() as Iterable<GemeenteModelStruct?>)
|
|
|
|
|
+ .withoutNulls
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .cast<GemeenteModelStruct>();
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ _model.isLoadingGemeenteDone = true;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ }
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ _model.favorieteGemeentenResultaat = await actions.getFavorieteGemeenten(
|
|
|
|
|
+ FFAppState().favorieteGemeenteIds.toList(),
|
|
|
|
|
+ );
|
|
|
|
|
+ _model.favorieteGemeentenLijst = _model.favorieteGemeentenResultaat!
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .cast<GemeenteModelStruct>();
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @override
|
|
|
|
|
+ void dispose() {
|
|
|
|
|
+ routeObserver.unsubscribe(this);
|
|
|
|
|
+
|
|
|
|
|
+ _model.maybeDispose();
|
|
|
|
|
+
|
|
|
|
|
+ super.dispose();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @override
|
|
|
|
|
+ void didUpdateWidget(
|
|
|
|
|
+ KanwaegSelectStateDropDownComponentCopyWidget 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);
|
|
|
|
|
+ context.watch<FFAppState>();
|
|
|
|
|
+
|
|
|
|
|
+ return Container(
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: FlutterFlowTheme.of(context).secondaryBackground,
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ if (_model.isLoadingProvinciesDone)
|
|
|
|
|
+ FlutterFlowDropDown<String>(
|
|
|
|
|
+ controller: _model.dropDownProvincieValueController ??=
|
|
|
|
|
+ FormFieldController<String>(
|
|
|
|
|
+ _model.dropDownProvincieValue ??=
|
|
|
|
|
+ FFAppState().provincieSelectId,
|
|
|
|
|
+ ),
|
|
|
|
|
+ options: List<String>.from(FFAppState()
|
|
|
|
|
+ .provincielijst
|
|
|
|
|
+ .map((e) => e.provincieid)
|
|
|
|
|
+ .toList()),
|
|
|
|
|
+ optionLabels: FFAppState()
|
|
|
|
|
+ .provincielijst
|
|
|
|
|
+ .map((e) => e.provinciename)
|
|
|
|
|
+ .toList(),
|
|
|
|
|
+ onChanged: (val) async {
|
|
|
|
|
+ safeSetState(() =>
|
|
|
|
|
+ _model.dropDownProvincieValue = val); // Action 1 gemeente
|
|
|
|
|
+ _model.isLoadingGemeenteDone = false;
|
|
|
|
|
+ // provincieidselect
|
|
|
|
|
+ // Action 2 update appstate provincie select
|
|
|
|
|
+ FFAppState().provincieSelectId = _model.dropDownProvincieValue!;
|
|
|
|
|
+ FFAppState().provincieSelectName = functions.provincieNaamById(
|
|
|
|
|
+ FFAppState().provincielijst.toList(),
|
|
|
|
|
+ FFAppState().provincieSelectId)!;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ _model.apiGemeenteResultbutton = await GemeentenCall.call(
|
|
|
|
|
+ provincieid: FFAppState().provincieSelectId,
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ FFAppState().gemeentelijst =
|
|
|
|
|
+ ((_model.apiGemeenteResultbutton?.jsonBody ?? '')
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .map<GemeenteModelStruct?>(
|
|
|
|
|
+ GemeenteModelStruct.maybeFromMap)
|
|
|
|
|
+ .toList() as Iterable<GemeenteModelStruct?>)
|
|
|
|
|
+ .withoutNulls
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .cast<GemeenteModelStruct>();
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ // Action 4 IsLoadingGemeenteDone
|
|
|
|
|
+ _model.isLoadingGemeenteDone = true;
|
|
|
|
|
+ FFAppState().gemeentelijst =
|
|
|
|
|
+ ((_model.apiGemeenteResultbutton?.jsonBody ?? '')
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .map<GemeenteModelStruct?>(
|
|
|
|
|
+ GemeenteModelStruct.maybeFromMap)
|
|
|
|
|
+ .toList() as Iterable<GemeenteModelStruct?>)
|
|
|
|
|
+ .withoutNulls
|
|
|
|
|
+ .toList()
|
|
|
|
|
+ .cast<GemeenteModelStruct>();
|
|
|
|
|
+ _model.updatePage(() {});
|
|
|
|
|
+
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ },
|
|
|
|
|
+ width: 200.0,
|
|
|
|
|
+ height: 40.0,
|
|
|
|
|
+ textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
|
|
|
+ font: GoogleFonts.inter(
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ letterSpacing: 0.0,
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ hintText: FFLocalizations.of(context).getText(
|
|
|
|
|
+ '4uyi9owz' /* Select... */,
|
|
|
|
|
+ ),
|
|
|
|
|
+ icon: Icon(
|
|
|
|
|
+ Icons.keyboard_arrow_down_rounded,
|
|
|
|
|
+ color: FlutterFlowTheme.of(context).secondaryText,
|
|
|
|
|
+ size: 24.0,
|
|
|
|
|
+ ),
|
|
|
|
|
+ fillColor: FlutterFlowTheme.of(context).secondaryBackground,
|
|
|
|
|
+ elevation: 2.0,
|
|
|
|
|
+ borderColor: Colors.transparent,
|
|
|
|
|
+ borderWidth: 0.0,
|
|
|
|
|
+ borderRadius: 8.0,
|
|
|
|
|
+ margin: EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 12.0, 0.0),
|
|
|
|
|
+ hidesUnderline: true,
|
|
|
|
|
+ isOverButton: false,
|
|
|
|
|
+ isSearchable: false,
|
|
|
|
|
+ isMultiSelect: false,
|
|
|
|
|
+ ),
|
|
|
|
|
+ if (_model.isLoadingGemeenteDone)
|
|
|
|
|
+ FlutterFlowDropDown<String>(
|
|
|
|
|
+ controller: _model.dropDownGemeenteValueController ??=
|
|
|
|
|
+ FormFieldController<String>(
|
|
|
|
|
+ _model.dropDownGemeenteValue ??= FFAppState().gemeenteSelectId,
|
|
|
|
|
+ ),
|
|
|
|
|
+ options: List<String>.from(
|
|
|
|
|
+ FFAppState().gemeentelijst.map((e) => e.gemeenteid).toList()),
|
|
|
|
|
+ optionLabels: FFAppState()
|
|
|
|
|
+ .gemeentelijst
|
|
|
|
|
+ .map((e) => e.gemeentename)
|
|
|
|
|
+ .toList(),
|
|
|
|
|
+ onChanged: (val) async {
|
|
|
|
|
+ safeSetState(() => _model.dropDownGemeenteValue = val);
|
|
|
|
|
+ FFAppState().gemeenteSelectId = _model.dropDownGemeenteValue!;
|
|
|
|
|
+ FFAppState().gemeenteSelectNaam = functions.gemeenteNaamById(
|
|
|
|
|
+ FFAppState().gemeentelijst.toList(),
|
|
|
|
|
+ FFAppState().gemeenteSelectId)!;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ },
|
|
|
|
|
+ width: 200.0,
|
|
|
|
|
+ height: 40.0,
|
|
|
|
|
+ textStyle: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
|
|
|
+ font: GoogleFonts.inter(
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ letterSpacing: 0.0,
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ hintText: FFLocalizations.of(context).getText(
|
|
|
|
|
+ '4a1hzuht' /* Select... */,
|
|
|
|
|
+ ),
|
|
|
|
|
+ icon: Icon(
|
|
|
|
|
+ Icons.keyboard_arrow_down_rounded,
|
|
|
|
|
+ color: FlutterFlowTheme.of(context).secondaryText,
|
|
|
|
|
+ size: 24.0,
|
|
|
|
|
+ ),
|
|
|
|
|
+ fillColor: FlutterFlowTheme.of(context).secondaryBackground,
|
|
|
|
|
+ elevation: 2.0,
|
|
|
|
|
+ borderColor: Colors.transparent,
|
|
|
|
|
+ borderWidth: 0.0,
|
|
|
|
|
+ borderRadius: 8.0,
|
|
|
|
|
+ margin: EdgeInsetsDirectional.fromSTEB(12.0, 0.0, 12.0, 0.0),
|
|
|
|
|
+ hidesUnderline: true,
|
|
|
|
|
+ isOverButton: false,
|
|
|
|
|
+ isSearchable: false,
|
|
|
|
|
+ isMultiSelect: false,
|
|
|
|
|
+ ),
|
|
|
|
|
+ Row(
|
|
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(
|
|
|
|
|
+ FFLocalizations.of(context).getText(
|
|
|
|
|
+ 't871osuh' /* Toevoegen favoriet */,
|
|
|
|
|
+ ),
|
|
|
|
|
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
|
|
|
+ font: GoogleFonts.inter(
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ letterSpacing: 0.0,
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).bodyMedium.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ Builder(
|
|
|
|
|
+ builder: (context) {
|
|
|
|
|
+ if (FFAppState()
|
|
|
|
|
+ .favorieteGemeenteIds
|
|
|
|
|
+ .contains(FFAppState().gemeenteSelectId) ==
|
|
|
|
|
+ true) {
|
|
|
|
|
+ return FlutterFlowIconButton(
|
|
|
|
|
+ borderRadius: 8.0,
|
|
|
|
|
+ buttonSize: 40.0,
|
|
|
|
|
+ fillColor: Color(0xFFB50808),
|
|
|
|
|
+ icon: Icon(
|
|
|
|
|
+ Icons.favorite,
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ size: 24.0,
|
|
|
|
|
+ ),
|
|
|
|
|
+ onPressed: () async {
|
|
|
|
|
+ await actions.drupalRequest(
|
|
|
|
|
+ 'POST',
|
|
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/favorieten/unflag.json',
|
|
|
|
|
+ FFAppState().userSessionname,
|
|
|
|
|
+ FFAppState().userSessionid,
|
|
|
|
|
+ FFAppState().userToken,
|
|
|
|
|
+ '{\"entity_id\": ${FFAppState().gemeenteSelectId}, \"entity_type\": \"taxonomy_term\"}',
|
|
|
|
|
+ );
|
|
|
|
|
+ FFAppState().removeFromFavorieteGemeenteIds(
|
|
|
|
|
+ FFAppState().gemeenteSelectId);
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return FlutterFlowIconButton(
|
|
|
|
|
+ borderRadius: 8.0,
|
|
|
|
|
+ buttonSize: 40.0,
|
|
|
|
|
+ fillColor: Color(0xFFB50808),
|
|
|
|
|
+ icon: Icon(
|
|
|
|
|
+ Icons.favorite_border,
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ size: 24.0,
|
|
|
|
|
+ ),
|
|
|
|
|
+ onPressed: () async {
|
|
|
|
|
+ await actions.drupalRequest(
|
|
|
|
|
+ 'POST',
|
|
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/favorieten/flag.json',
|
|
|
|
|
+ FFAppState().userSessionname,
|
|
|
|
|
+ FFAppState().userSessionid,
|
|
|
|
|
+ FFAppState().userToken,
|
|
|
|
|
+ '{\"entity_id\": ${FFAppState().gemeenteSelectId}, \"entity_type\": \"taxonomy_term\"}',
|
|
|
|
|
+ );
|
|
|
|
|
+ FFAppState().addToFavorieteGemeenteIds(
|
|
|
|
|
+ FFAppState().gemeenteSelectId);
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+ },
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ FFButtonWidget(
|
|
|
|
|
+ onPressed: () async {
|
|
|
|
|
+ context.pushNamed(HomeWidget.routeName);
|
|
|
|
|
+ },
|
|
|
|
|
+ text: FFLocalizations.of(context).getText(
|
|
|
|
|
+ 'zb8hr9df' /* Toepassen */,
|
|
|
|
|
+ ),
|
|
|
|
|
+ options: FFButtonOptions(
|
|
|
|
|
+ height: 40.0,
|
|
|
|
|
+ padding: EdgeInsetsDirectional.fromSTEB(16.0, 0.0, 16.0, 0.0),
|
|
|
|
|
+ iconPadding: EdgeInsetsDirectional.fromSTEB(0.0, 0.0, 0.0, 0.0),
|
|
|
|
|
+ color: FlutterFlowTheme.of(context).primary,
|
|
|
|
|
+ textStyle: FlutterFlowTheme.of(context).titleSmall.override(
|
|
|
|
|
+ font: GoogleFonts.interTight(
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).titleSmall.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).titleSmall.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ letterSpacing: 0.0,
|
|
|
|
|
+ fontWeight:
|
|
|
|
|
+ FlutterFlowTheme.of(context).titleSmall.fontWeight,
|
|
|
|
|
+ fontStyle:
|
|
|
|
|
+ FlutterFlowTheme.of(context).titleSmall.fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ elevation: 0.0,
|
|
|
|
|
+ borderRadius: BorderRadius.circular(8.0),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ Builder(
|
|
|
|
|
+ builder: (context) {
|
|
|
|
|
+ final favorieteGemeenteItem =
|
|
|
|
|
+ _model.favorieteGemeentenLijst.toList();
|
|
|
|
|
+ _model.debugGeneratorVariables[
|
|
|
|
|
+ 'favorieteGemeenteItem${favorieteGemeenteItem.length > 100 ? ' (first 100)' : ''}'] =
|
|
|
|
|
+ debugSerializeParam(
|
|
|
|
|
+ favorieteGemeenteItem.take(100),
|
|
|
|
|
+ ParamType.DataStruct,
|
|
|
|
|
+ isList: true,
|
|
|
|
|
+ link:
|
|
|
|
|
+ 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kanwaegSelectStateDropDownComponentCopy',
|
|
|
|
|
+ name: 'GemeenteModel',
|
|
|
|
|
+ nullable: false,
|
|
|
|
|
+ );
|
|
|
|
|
+ debugLogWidgetClass(_model);
|
|
|
|
|
+
|
|
|
|
|
+ return Wrap(
|
|
|
|
|
+ spacing: 0.0,
|
|
|
|
|
+ runSpacing: 0.0,
|
|
|
|
|
+ alignment: WrapAlignment.start,
|
|
|
|
|
+ crossAxisAlignment: WrapCrossAlignment.start,
|
|
|
|
|
+ direction: Axis.horizontal,
|
|
|
|
|
+ runAlignment: WrapAlignment.start,
|
|
|
|
|
+ verticalDirection: VerticalDirection.down,
|
|
|
|
|
+ clipBehavior: Clip.none,
|
|
|
|
|
+ children: List.generate(favorieteGemeenteItem.length,
|
|
|
|
|
+ (favorieteGemeenteItemIndex) {
|
|
|
|
|
+ final favorieteGemeenteItemItem =
|
|
|
|
|
+ favorieteGemeenteItem[favorieteGemeenteItemIndex];
|
|
|
|
|
+ return InkWell(
|
|
|
|
|
+ splashColor: Colors.transparent,
|
|
|
|
|
+ focusColor: Colors.transparent,
|
|
|
|
|
+ hoverColor: Colors.transparent,
|
|
|
|
|
+ highlightColor: Colors.transparent,
|
|
|
|
|
+ onTap: () async {
|
|
|
|
|
+ FFAppState().gemeenteSelectId =
|
|
|
|
|
+ favorieteGemeenteItemItem.gemeenteid;
|
|
|
|
|
+ FFAppState().gemeenteSelectNaam =
|
|
|
|
|
+ favorieteGemeenteItemItem.gemeentename;
|
|
|
|
|
+ safeSetState(() {});
|
|
|
|
|
+
|
|
|
|
|
+ context.pushNamed(HomeWidget.routeName);
|
|
|
|
|
+ },
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: FlutterFlowTheme.of(context).secondaryBackground,
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ favorieteGemeenteItemItem.gemeentename,
|
|
|
|
|
+ style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
|
|
|
+ font: GoogleFonts.inter(
|
|
|
|
|
+ fontWeight: FlutterFlowTheme.of(context)
|
|
|
|
|
+ .bodyMedium
|
|
|
|
|
+ .fontWeight,
|
|
|
|
|
+ fontStyle: FlutterFlowTheme.of(context)
|
|
|
|
|
+ .bodyMedium
|
|
|
|
|
+ .fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ letterSpacing: 0.0,
|
|
|
|
|
+ fontWeight: FlutterFlowTheme.of(context)
|
|
|
|
|
+ .bodyMedium
|
|
|
|
|
+ .fontWeight,
|
|
|
|
|
+ fontStyle: FlutterFlowTheme.of(context)
|
|
|
|
|
+ .bodyMedium
|
|
|
|
|
+ .fontStyle,
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ }),
|
|
|
|
|
+ );
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+}
|