Hi everyone,
I’m just starting with FlutterFlow, and I’d like some advice on my approach. Specifically, I need to know how to change the state of a child component from a parent (or grandparent) component. Here’s my current setup:
1. Components Overview:
- TimeModal: A custom dialog component.
- Timer: A component included in TimeModal.
- TimeForm: Another component included in TimeModal.
- TimeField: A component within TimeForm that includes: a container, a button to add 15 minutes, a field displaying time as a string, a button to reduce 15 minutes from the field time
2. State Management:
- The TimeField component includes a state variable called isEditModeFieldState.
- If isEditModeFieldState is true, the field should be read-only and the buttons should be hidden.
- This state is initially set based on a component parameter isEditModeFieldParameter via an action On Initialization.
3. My Question:
- How can I toggle isEditModeFieldState from an action within the TimeModal component?
- I basically need to be able to execute an action from the TimeModal context, so the field's buttons’ visibility and the read-only property also update accordingly.
Thanks in advance!