fixed dialog shape
This commit is contained in:
parent
c819c3478c
commit
87c58adb7a
2 changed files with 5 additions and 2 deletions
|
@ -51,6 +51,8 @@ class AvesDialog extends StatelessWidget {
|
|||
actions: actions,
|
||||
actionsPadding: actionsPadding,
|
||||
buttonPadding: buttonPadding,
|
||||
// clipping to prevent highlighted material to bleed through rounded corners
|
||||
clipBehavior: Clip.antiAlias,
|
||||
shape: shape(context),
|
||||
);
|
||||
}
|
||||
|
@ -74,7 +76,8 @@ class AvesDialog extends StatelessWidget {
|
|||
thumbVisibility: MaterialStateProperty.all(true),
|
||||
radius: const Radius.circular(16),
|
||||
crossAxisMargin: 4,
|
||||
mainAxisMargin: 4,
|
||||
// adapt margin when corner is around content itself, not outside for the title
|
||||
mainAxisMargin: 4 + (title != null ? 0 : cornerRadius.y / 2),
|
||||
interactive: true,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -63,7 +63,7 @@ class _AvesSelectionDialogState<T> extends State<AvesSelectionDialog<T>> {
|
|||
return AvesDialog(
|
||||
title: title,
|
||||
scrollableContent: [
|
||||
if (title == null && message == null) SizedBox(height: AvesDialog.cornerRadius.y),
|
||||
if (title == null && message == null) SizedBox(height: AvesDialog.cornerRadius.y / 2),
|
||||
if (message != null)
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
|
|
Loading…
Reference in a new issue