builder: (context, state) {
if(state.status == RecievingState.success && state.userData != null){
return Column(
children: [ Vibration.vibrate(); //error
],)
},
}
as soon as the data is changed from API. I want the phone to vibrate within same page…
2
Answers
Column children should be widget only like this
if you want to use vibrate please refer
If you like vibrate every time the
if
condition get satisfied, you can do :You can add another
bool
to control the vibrate on thebuild
method.If you like to check the state, Use FutureBuilder.