Close Drawer when resized to expanded view.

This commit is contained in:
Dain Nilsson 2023-09-27 15:23:09 +02:00
parent 5f78b0952f
commit 221ca6ca21
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -66,7 +66,11 @@ class AppPage extends StatelessWidget {
// Single column layout, maybe with rail
return _buildScaffold(context, true, hasRail);
} else {
// Fully expanded layout
// Fully expanded layout, close existing drawer if open
final scaffoldState = scaffoldGlobalKey.currentState;
if (scaffoldState?.isDrawerOpen == true) {
scaffoldState?.openEndDrawer();
}
return Scaffold(
body: Row(
crossAxisAlignment: CrossAxisAlignment.start,