The sequence it uses is: background content (delegated to you) border focused outline selected overlay
Example code:
void paint(WidgetPainter painter) { painter.drawThemed((bounds) { return bounds; // if the selection overlay should be contained, you can return it here. }); }
Draws the general pattern of a widget if you don't need anything particularly special and/or control the other details through your widget's style theme hints.
It gives your draw delegate a Rectangle representing the coordinates inside your border and padding.
If you change teh clip rectangle, you should change it back before you return.