desktop dialog mod to allow setting max size

This commit is contained in:
julian 2022-10-27 15:23:31 -06:00
parent be81625d2b
commit ec7840419f

View file

@ -2,9 +2,16 @@ import 'package:flutter/material.dart';
import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart';
class DesktopDialog extends StatelessWidget { class DesktopDialog extends StatelessWidget {
const DesktopDialog({Key? key, this.child}) : super(key: key); const DesktopDialog({
Key? key,
this.child,
this.maxWidth = 641,
this.maxHeight = 474,
}) : super(key: key);
final Widget? child; final Widget? child;
final double maxWidth;
final double maxHeight;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -13,9 +20,9 @@ class DesktopDialog extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
ConstrainedBox( ConstrainedBox(
constraints: const BoxConstraints( constraints: BoxConstraints(
maxWidth: 641, maxWidth: maxWidth,
maxHeight: 474, maxHeight: maxHeight,
), ),
child: Material( child: Material(
borderRadius: BorderRadius.circular( borderRadius: BorderRadius.circular(