OnTap is triggered automatically #115
-
when I go to my site OnTap is triggered automatically! how i can fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Can you provide more info please, I dont understand your problem. Maybe link some code that you used for speed dial and also the version of flutter_speed_dial you are using from the pubspec.yaml |
Beta Was this translation helpful? Give feedback.
-
i Have a function and call this onTap but, if i start the app, the function is call automatically. myFunction(){
print('Hello');
}
SpeedDialChild(
child: Icon(Icons.brush),
backgroundColor: Colors.blue,
label: 'Second',
labelStyle: TextStyle(fontSize: 18.0),
onTap: myFunction(),
), |
Beta Was this translation helpful? Give feedback.
-
@MarcelHH
to
as it only accepts VoidCallbacks and not a function as a whole. Secondly it doesn't seems related to this library rather it seems you are calling this function somewhere else in your code, you can easily find it by searching for
If you find the error then you can close this issue, else you can write what you did and what didn't work. |
Beta Was this translation helpful? Give feedback.
-
onTap: myFunction, that solved my problem thank you |
Beta Was this translation helpful? Give feedback.
@MarcelHH
Firstly, convert
to
as it only accepts VoidCallbacks and not a function as a whole.
Secondly it doesn't seems related to this library rather it seems you are calling this function somewhere else in your code, you can easily find it by searching for
If you find the error then you can close this issue, else you can write what you did and what didn't work.