refactor: Replace user bottom sheet with menu and small dialog

Signed-off-by: Krille <c.kussowski@famedly.com>
This commit is contained in:
Krille 2025-04-10 18:27:16 +02:00
commit a12c48fae6
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
21 changed files with 734 additions and 851 deletions

View file

@ -5,12 +5,14 @@ class AdaptiveDialogAction extends StatelessWidget {
final VoidCallback? onPressed;
final bool autofocus;
final Widget child;
final bool bigButtons;
const AdaptiveDialogAction({
super.key,
required this.onPressed,
required this.child,
this.autofocus = false,
this.bigButtons = false,
});
@override
@ -21,6 +23,27 @@ class AdaptiveDialogAction extends StatelessWidget {
case TargetPlatform.fuchsia:
case TargetPlatform.linux:
case TargetPlatform.windows:
if (bigButtons) {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: SizedBox(
width: double.infinity,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: autofocus
? theme.colorScheme.primary
: theme.colorScheme.primaryContainer,
foregroundColor: autofocus
? theme.colorScheme.onPrimary
: theme.colorScheme.onPrimaryContainer,
),
onPressed: onPressed,
autofocus: autofocus,
child: child,
),
),
);
}
return TextButton(
onPressed: onPressed,
autofocus: autofocus,