fixed dialog layout
This commit is contained in:
parent
c1a176d389
commit
6979802da9
3 changed files with 9 additions and 10 deletions
|
@ -15,6 +15,8 @@ class AvesDialog extends StatelessWidget {
|
||||||
static const double defaultHorizontalContentPadding = 24;
|
static const double defaultHorizontalContentPadding = 24;
|
||||||
static const double controlCaptionPadding = 16;
|
static const double controlCaptionPadding = 16;
|
||||||
static const double borderWidth = 1.0;
|
static const double borderWidth = 1.0;
|
||||||
|
static const EdgeInsets actionsPadding = EdgeInsets.symmetric(vertical: 4, horizontal: 8);
|
||||||
|
static const EdgeInsets buttonPadding = EdgeInsets.symmetric(horizontal: 8);
|
||||||
|
|
||||||
AvesDialog({
|
AvesDialog({
|
||||||
super.key,
|
super.key,
|
||||||
|
@ -46,7 +48,8 @@ class AvesDialog extends StatelessWidget {
|
||||||
content: _buildContent(context),
|
content: _buildContent(context),
|
||||||
contentPadding: scrollableContent != null ? EdgeInsets.zero : EdgeInsets.only(left: horizontalContentPadding, top: 20, right: horizontalContentPadding),
|
contentPadding: scrollableContent != null ? EdgeInsets.zero : EdgeInsets.only(left: horizontalContentPadding, top: 20, right: horizontalContentPadding),
|
||||||
actions: actions,
|
actions: actions,
|
||||||
actionsPadding: const EdgeInsets.symmetric(horizontal: 8),
|
actionsPadding: actionsPadding,
|
||||||
|
buttonPadding: buttonPadding,
|
||||||
shape: shape(context),
|
shape: shape(context),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -133,7 +136,7 @@ class DialogTitle extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 20, horizontal: 16),
|
padding: const EdgeInsets.symmetric(vertical: 18, horizontal: 16),
|
||||||
decoration: AvesDialog.contentDecoration(context),
|
decoration: AvesDialog.contentDecoration(context),
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
|
|
|
@ -150,13 +150,11 @@ class _CoverSelectionDialogState extends State<CoverSelectionDialog> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const actionsPadding = EdgeInsets.symmetric(horizontal: 8);
|
|
||||||
const double actionsSpacing = 8.0;
|
|
||||||
final actionsWidget = Padding(
|
final actionsWidget = Padding(
|
||||||
padding: actionsPadding.add(const EdgeInsets.all(actionsSpacing)),
|
padding: AvesDialog.actionsPadding,
|
||||||
child: OverflowBar(
|
child: OverflowBar(
|
||||||
alignment: MainAxisAlignment.end,
|
alignment: MainAxisAlignment.end,
|
||||||
spacing: actionsSpacing,
|
spacing: AvesDialog.buttonPadding.horizontal / 2,
|
||||||
overflowAlignment: OverflowBarAlignment.end,
|
overflowAlignment: OverflowBarAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
TextButton(
|
TextButton(
|
||||||
|
|
|
@ -178,13 +178,11 @@ class _TileViewDialogState<S, G, L> extends State<TileViewDialog<S, G, L>> with
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
const actionsPadding = EdgeInsets.symmetric(horizontal: 8);
|
|
||||||
const double actionsSpacing = 8.0;
|
|
||||||
final actionsWidget = Padding(
|
final actionsWidget = Padding(
|
||||||
padding: actionsPadding.add(const EdgeInsets.all(actionsSpacing)),
|
padding: AvesDialog.actionsPadding,
|
||||||
child: OverflowBar(
|
child: OverflowBar(
|
||||||
alignment: MainAxisAlignment.end,
|
alignment: MainAxisAlignment.end,
|
||||||
spacing: actionsSpacing,
|
spacing: AvesDialog.buttonPadding.horizontal / 2,
|
||||||
overflowAlignment: OverflowBarAlignment.end,
|
overflowAlignment: OverflowBarAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
TextButton(
|
TextButton(
|
||||||
|
|
Loading…
Reference in a new issue