|
@@ -322,61 +322,84 @@ class _SelectStateDropDownComponentWidgetState
|
|
|
isSearchable: false,
|
|
isSearchable: false,
|
|
|
isMultiSelect: false,
|
|
isMultiSelect: false,
|
|
|
),
|
|
),
|
|
|
- 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\"}',
|
|
|
|
|
|
|
+ Row(
|
|
|
|
|
+ mainAxisSize: MainAxisSize.max,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(
|
|
|
|
|
+ FFLocalizations.of(context).getText(
|
|
|
|
|
+ 'nosgkxy0' /* 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(() {});
|
|
|
|
|
+ },
|
|
|
);
|
|
);
|
|
|
- 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\"}',
|
|
|
|
|
|
|
+ } 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(() {});
|
|
|
|
|
+ },
|
|
|
);
|
|
);
|
|
|
- FFAppState().addToFavorieteGemeenteIds(
|
|
|
|
|
- FFAppState().gemeenteSelectId);
|
|
|
|
|
- safeSetState(() {});
|
|
|
|
|
- },
|
|
|
|
|
- );
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
),
|
|
),
|
|
|
FFButtonWidget(
|
|
FFButtonWidget(
|
|
|
onPressed: () async {
|
|
onPressed: () async {
|