My project uses BLoC, not MobX.
When building a custom node (for example, an ApiRequest node), there is a dropdown menu inside the node. After selecting an item from the dropdown, I want to update the data of that node.
Widget _buildNode(Node<LogicNode> node) {
switch (node.data) {
case ApiRequest():
return BlocBuilder<LogicFlowBloc, LogicFlowState>(
builder: (context, state) {
return FDropdown(
dataItems: state.apiList,
itemBuilder: (v) {
return Text(v.apiName);
},
onChanged: (v) {
// I want to update the node's data here
},
);
},
);
default:
return Center(
child: Text((node.data).displayName),
);
}
}
My project uses BLoC, not MobX.
When building a custom node (for example, an ApiRequest node), there is a dropdown menu inside the node. After selecting an item from the dropdown, I want to update the data of that node.