mirror of
https://github.com/gabehf/Fladder.git
synced 2026-03-07 21:48:14 -08:00
## Pull Request Description This fixes a bunch of padding issues, and also improves padding in other areas. Issue Number: #29 --------- Co-authored-by: PartyDonut <PartyDonut@users.noreply.github.com>
24 lines
637 B
Dart
24 lines
637 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:fladder/util/adaptive_layout.dart';
|
|
|
|
Future<void> showDialogAdaptive(
|
|
{required BuildContext context, required Widget Function(BuildContext context) builder}) {
|
|
if (AdaptiveLayout.of(context).inputDevice == InputDevice.pointer) {
|
|
return showDialog(
|
|
context: context,
|
|
useSafeArea: false,
|
|
builder: (context) => Dialog(
|
|
child: builder(context),
|
|
),
|
|
);
|
|
} else {
|
|
return showDialog(
|
|
context: context,
|
|
useSafeArea: false,
|
|
builder: (context) => Dialog.fullscreen(
|
|
child: builder(context),
|
|
),
|
|
);
|
|
}
|
|
}
|