mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-23 09:56:23 +03:00
Merge PR #106.
This commit is contained in:
commit
9b0266b08d
@ -21,11 +21,11 @@ ScaffoldFeatureController showMessage(
|
||||
|
||||
Future<void> showBottomMenu(
|
||||
BuildContext context, List<MenuAction> actions) async {
|
||||
MediaQuery? mediaQuery = context.findAncestorWidgetOfExactType<MediaQuery>();
|
||||
var width = mediaQuery?.data.size.width ?? 0;
|
||||
await showModalBottomSheet(
|
||||
context: context,
|
||||
constraints: MediaQuery.of(context).size.width > 540
|
||||
? const BoxConstraints(maxWidth: 380)
|
||||
: null,
|
||||
constraints: width > 540 ? const BoxConstraints(maxWidth: 380) : null,
|
||||
builder: (context) => SafeArea(child: _BottomMenu(actions)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user