|
|
@@ -1,9 +1,10 @@
|
|
|
-import '/backend/api_requests/api_calls.dart';
|
|
|
import '/flutter_flow/flutter_flow_theme.dart';
|
|
|
import '/flutter_flow/flutter_flow_util.dart';
|
|
|
import '/flutter_flow/flutter_flow_widgets.dart';
|
|
|
import 'dart:ui';
|
|
|
+import '/custom_code/actions/index.dart' as actions;
|
|
|
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';
|
|
|
@@ -29,6 +30,18 @@ class _KanwegWidgetState extends State<KanwegWidget> with RouteAware {
|
|
|
void initState() {
|
|
|
super.initState();
|
|
|
_model = createModel(context, () => KanwegModel());
|
|
|
+
|
|
|
+ // On page load action.
|
|
|
+ SchedulerBinding.instance.addPostFrameCallback((_) async {
|
|
|
+ _model.resultDrupalRequest = await actions.drupalRequest(
|
|
|
+ 'GET',
|
|
|
+ 'https://uitgaanskrant.com/nl/flutterdrup/views/flutterfavorietenagenda.json?display_id=services_1',
|
|
|
+ 'SSESSfb38a72b665678c06dea69b92d0e88c6',
|
|
|
+ 'nagC2i49GY6Wd4ENeD4-vKaQhryKcnKGL55orWbI7Dw',
|
|
|
+ 'e21ntWRxYs1Q6sUHlA0xlX0nzLMf43UnsFHByfQaRaw',
|
|
|
+ '',
|
|
|
+ );
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
@override
|
|
|
@@ -87,7 +100,6 @@ class _KanwegWidgetState extends State<KanwegWidget> with RouteAware {
|
|
|
DebugFlutterFlowModelContext.maybeOf(context)
|
|
|
?.parentModelCallback
|
|
|
?.call(_model);
|
|
|
- context.watch<FFAppState>();
|
|
|
|
|
|
return GestureDetector(
|
|
|
onTap: () {
|
|
|
@@ -99,97 +111,52 @@ class _KanwegWidgetState extends State<KanwegWidget> with RouteAware {
|
|
|
backgroundColor: FlutterFlowTheme.of(context).primaryBackground,
|
|
|
body: SafeArea(
|
|
|
top: true,
|
|
|
- child: FutureBuilder<ApiCallResponse>(
|
|
|
- future: FavorietenAgendaCall.call(
|
|
|
- sessionName: FFAppState().userSessionname,
|
|
|
- sessionId: FFAppState().userSessionid,
|
|
|
- ),
|
|
|
- builder: (context, snapshot) {
|
|
|
- // Customize what your widget looks like when it's loading.
|
|
|
- if (!snapshot.hasData) {
|
|
|
- return Center(
|
|
|
- child: SizedBox(
|
|
|
- width: 80.0,
|
|
|
- height: 80.0,
|
|
|
- child: SpinKitFadingCircle(
|
|
|
- color: Color(0xFFB1061E),
|
|
|
- size: 80.0,
|
|
|
- ),
|
|
|
- ),
|
|
|
- );
|
|
|
- }
|
|
|
- final columnFavorietenAgendaResponse = snapshot.data!;
|
|
|
- _model.debugBackendQueries[
|
|
|
- 'FavorietenAgendaCall_statusCode_Column_26my15h6'] =
|
|
|
+ child: Builder(
|
|
|
+ builder: (context) {
|
|
|
+ final item = getJsonField(
|
|
|
+ _model.resultDrupalRequest,
|
|
|
+ r'''$''',
|
|
|
+ ).toList();
|
|
|
+ _model.debugGeneratorVariables[
|
|
|
+ 'item${item.length > 100 ? ' (first 100)' : ''}'] =
|
|
|
debugSerializeParam(
|
|
|
- columnFavorietenAgendaResponse.statusCode,
|
|
|
- ParamType.int,
|
|
|
+ item.take(100),
|
|
|
+ ParamType.JSON,
|
|
|
+ isList: true,
|
|
|
link:
|
|
|
'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kanweg',
|
|
|
- name: 'int',
|
|
|
- nullable: false,
|
|
|
- );
|
|
|
- _model.debugBackendQueries[
|
|
|
- 'FavorietenAgendaCall_responseBody_Column_26my15h6'] =
|
|
|
- debugSerializeParam(
|
|
|
- columnFavorietenAgendaResponse.bodyText,
|
|
|
- ParamType.String,
|
|
|
- link:
|
|
|
- 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kanweg',
|
|
|
- name: 'String',
|
|
|
+ name: 'dynamic',
|
|
|
nullable: false,
|
|
|
);
|
|
|
debugLogWidgetClass(_model);
|
|
|
|
|
|
- return Builder(
|
|
|
- builder: (context) {
|
|
|
- final items = getJsonField(
|
|
|
- columnFavorietenAgendaResponse.jsonBody,
|
|
|
- r'''$''',
|
|
|
- ).toList();
|
|
|
- _model.debugGeneratorVariables[
|
|
|
- 'items${items.length > 100 ? ' (first 100)' : ''}'] =
|
|
|
- debugSerializeParam(
|
|
|
- items.take(100),
|
|
|
- ParamType.JSON,
|
|
|
- isList: true,
|
|
|
- link:
|
|
|
- 'https://app.flutterflow.io/project/uitgaanskrant-1qhvtd?tab=uiBuilder&page=kanweg',
|
|
|
- name: 'dynamic',
|
|
|
- nullable: false,
|
|
|
- );
|
|
|
- debugLogWidgetClass(_model);
|
|
|
-
|
|
|
- return Column(
|
|
|
- mainAxisSize: MainAxisSize.max,
|
|
|
- children: List.generate(items.length, (itemsIndex) {
|
|
|
- final itemsItem = items[itemsIndex];
|
|
|
- return Text(
|
|
|
- getJsonField(
|
|
|
- itemsItem,
|
|
|
- r'''$.title''',
|
|
|
- ).toString(),
|
|
|
- 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,
|
|
|
- ),
|
|
|
- );
|
|
|
- }),
|
|
|
+ return Column(
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
+ children: List.generate(item.length, (itemIndex) {
|
|
|
+ final itemItem = item[itemIndex];
|
|
|
+ return Text(
|
|
|
+ getJsonField(
|
|
|
+ itemItem,
|
|
|
+ r'''$.datum''',
|
|
|
+ ).toString(),
|
|
|
+ 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,
|
|
|
+ ),
|
|
|
);
|
|
|
- },
|
|
|
+ }),
|
|
|
);
|
|
|
},
|
|
|
),
|