If you are unable to change the color of a RaisedButton, then the issue must be that you are using passing null to OnPressed Event. So to resolve the issue, you need to remove that null from the OnPressed and assign some function to it.
Thanks,
Srikanth