refactor: Replace user bottom sheet with menu and small dialog
Signed-off-by: Krille <c.kussowski@famedly.com>
This commit is contained in:
parent
b6b1d6ddb1
commit
a12c48fae6
21 changed files with 734 additions and 851 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue