-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Can we access your project?
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
Hello FlutterFlow team,
I am experiencing an issue in my app where objets in Events table seem to disappear from my database after I click the “Validate” button. I want to clarify that my code does not delete the event from the database — it only updates the validated field to true. But there is always a delete in my API (Supabase) and I don't understand why.
Actual behavior:
The event disappears from the screen. I was worried that it might have been deleted.
After reviewing my code, I confirmed there is no delete() call in the current button logic.
Additional info:
This started happening after I updated the project version in App Details.
Database: Supabase
Code snippet for the validation button:
// Generated code for this Button Widget...
FFButtonWidget(
onPressed: () async {
if (validateEvent2EventWithCreatorRow!.validated!) {
await EventsTable().update(
data: {
'prix': '',
'Lien_reservation': _model.descriptionTextController1.text,
},
matchingRows: (rows) => rows.eqOrNull(
'id',
widget!.validateevent,
),
);
} else {
await EventsTable().update(
data: {
'prix': '',
'Lien_reservation': _model.descriptionTextController1.text,
'validated': true,
},
matchingRows: (rows) => rows.eqOrNull(
'id',
widget!.validateevent,
),
);
unawaited(
() async {
await NotificationsTable().insert({
'user_id': validateEvent2EventWithCreatorRow?.authUserId,
'title': 'Evènement validé �',
'body':
'Ton évènement${validateEvent2EventWithCreatorRow?.name} est validé !',
});
}(),
);
}
context.pushNamed(ListEventToValidateWidget.routeName);
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: Text(
'Evènement validé',
style: TextStyle(
color: FlutterFlowTheme.of(context).secondaryBackground,
),
),
duration: Duration(milliseconds: 4000),
backgroundColor: FlutterFlowTheme.of(context).tertiary,
),
);
},
text: 'Valider',
options: FFButtonOptions(
width: 150,
height: 40,
padding: EdgeInsetsDirectional.fromSTEB(16, 0, 16, 0),
iconAlignment: IconAlignment.end,
iconPadding: EdgeInsetsDirectional.fromSTEB(0, 0, 0, 0),
color: FlutterFlowTheme.of(context).primary,
textStyle: FlutterFlowTheme.of(context).titleSmall.override(
fontFamily: FlutterFlowTheme.of(context).titleSmallFamily,
color: FlutterFlowTheme.of(context).secondaryBackground,
letterSpacing: 0.0,
useGoogleFonts: !FlutterFlowTheme.of(context).titleSmallIsCustom,
),
elevation: 0,
borderRadius: BorderRadius.circular(8),
),
)
Expected Behavior
Expected behavior:
The event should remain in the database.
It is okay if the event disappears from the filtered list, but it should not be deleted.
Steps to Reproduce
Steps to reproduce:
Open the ListEventToValidate screen.
The list is filtered to show only events where validated = false.
Click the “Validate” button on an event.
The event disappears from the list immediately and the object is deleted in Supabase.
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
ITESjPKA24tgostb16ryY8B6hQIgQ0QnU7gnlO1ucx4aB5jrPe0EYcn8U0NKTNOqSgphfVf/jkwK0POPj4XLUPcqNUuBUb5B0JVPEAv/UkOiWqmYEKqsOXBSJJpUG2Ke3KWNkwhDPtBpc3ct7UyXNq3qNleeY8aSfxBlZ7vfcPo=
Visual documentation
Environment
- FlutterFlow version: v6.5.23
- Platform: MacOS
- Browser name and version: Chrome
- Operating system and version affected:Additional Information
No response