adaptiveConversion method
Returns an equivalent configuration adapted for the current platform, e.g. a PopoverConfiguration becomes a DrawerConfiguration on mobile.
Returns this by default (no adaptation). Called by showOverlay when
adaptive: true (the default).
Implementation
@override
OverlayConfiguration<T> adaptiveConversion(BuildContext context) {
if (handler == null && isMobile(Theme.of(context).platform)) {
return toDrawer();
}
return this;
}