-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is not a bug, I just do not understand how to replace the default sendButtonBuilder #11
Comments
One way i'll suggest is to change it from the core code to fit what you want |
@SushiRoll53 Its really simple you create a function that returns a widget and the function you see a parameter is actually the Here's an example: Function sendButtonBuilder(Function onSend) {
return IconButton(
icon: Icon(
Icons.send,
color: Colors.white
),
onPress: onSend
);
}
// Your dashchat code
Dashchat(
sendButtonBuilder: sendButtonBuilder(),
) |
Much better |
Cool it seems easy, I tried as the following, I had to make some modifications so I was able to run a test
and the icon does not get replace it. |
It's me again, for the record I managed to solve with some help, here it is how I could fix it sendButtonBuilder(Function onSend) {
return IconButton(
icon: Icon(
Icons.send,
color: Colors.white
),
onPressed: onSend
);
}
Dashchat(
sendButtonBuilder: (function) {
sendButtonBuilder(function)
},
) I'm gonna close it, thank you for your responses. |
Reopening. This does not work, the onSend method does not get triggered. As this is not expected behavior, this is a bug. |
I was using the example and everything is working flawlessly, but then I try to change the default icon send but it ask for a specific time and I am not sure on how to create a type Widget Function(Function)
Could someone illustrate me. I do not need to modify the functionality, just the icon colors.
The text was updated successfully, but these errors were encountered: