closeButton property
You can make it functional by putting the back button. This button can be anywhere you want. You can add Positioned. It has no default location, you must specify it. The button is only visible on the detail screen.
Implementation
final Widget? closeButton;