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,
|
actions: actions,
|
||||||
actionsPadding: actionsPadding,
|
actionsPadding: actionsPadding,
|
||||||
buttonPadding: buttonPadding,
|
buttonPadding: buttonPadding,
|
||||||
|
// clipping to prevent highlighted material to bleed through rounded corners
|
||||||
|
clipBehavior: Clip.antiAlias,
|
||||||
shape: shape(context),
|
shape: shape(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -74,7 +76,8 @@ class AvesDialog extends StatelessWidget {
|
||||||
thumbVisibility: MaterialStateProperty.all(true),
|
thumbVisibility: MaterialStateProperty.all(true),
|
||||||
radius: const Radius.circular(16),
|
radius: const Radius.circular(16),
|
||||||
crossAxisMargin: 4,
|
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,
|
interactive: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -63,7 +63,7 @@ class _AvesSelectionDialogState<T> extends State<AvesSelectionDialog<T>> {
|
||||||
return AvesDialog(
|
return AvesDialog(
|
||||||
title: title,
|
title: title,
|
||||||
scrollableContent: [
|
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)
|
if (message != null)
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
|
|
Loading…
Reference in a new issue