@@ -215,10 +215,10 @@ In Nylo, you can send action events to your Widgets.
215215
216216```
217217// Send an action to the widget
218- sendAction ('hello_world_in_widget', state: MyWidget.state);
218+ stateAction ('hello_world_in_widget', state: MyWidget.state);
219219
220220// Another example
221- sendAction ('reset_data', state: HighScore.state);
221+ stateAction ('reset_data', state: HighScore.state);
222222```
223223
224224In your widget, you need the following code to handle the action.
@@ -274,11 +274,11 @@ get stateActions => {
274274Finally, you can send the action from anywhere in your application.
275275
276276``` dart
277- sendAction ('print_hello_world', state: MyWidget.state);
277+ stateAction ('print_hello_world', state: MyWidget.state);
278278
279279// prints 'Hello from the widget'
280280
281- sendAction ('reset_data', state: MyWidget.state);
281+ stateAction ('reset_data', state: MyWidget.state);
282282
283283// Reset data in widget
284284```
@@ -319,7 +319,7 @@ get stateActions => {
319319Finally, you can send the action from anywhere in your application.
320320
321321``` dart
322- sendAction ('test_page_action', state: MyPage.state);
322+ stateAction ('test_page_action', state: MyPage.state);
323323
324324// prints 'Hello from the page'
325325```
@@ -343,7 +343,7 @@ stateUpdated(dynamic data) async {
343343Then you can send the action from anywhere in your application.
344344
345345``` dart
346- sendAction ('reset_badge', state: MyPage.state);
346+ stateAction ('reset_badge', state: MyPage.state);
347347```
348348
349349<a name =" building-your-first-widget " ></a >
0 commit comments