I am using AlertDialog.adaptive, but in Android, if you specify the background color with backgroundColor, it will be reflected in the background color.
However, on IOS, even if you specify a color with backgroundColor, it is not reflected.
How can I specify the background color of AlertDialog.adaptive even on IOS?
No, it's not possible to do that with
AlertDialog.adaptive. In iOS this will create a CupertinoAlertDialog which won't use the provided background colour. You can read the documentation to know more details about this behaviour.The possible solutions are either you create your own widget which will mimic the dialog behaviour or use any third-party libraries (like material_dialogs)