stack_wallet/lib/widgets/desktop/desktop_dialog.dart

57 lines
1.4 KiB
Dart
Raw Normal View History

2023-05-26 21:21:16 +00:00
/*
* This file is part of Stack Wallet.
*
* Copyright (c) 2023 Cypher Stack
* All Rights Reserved.
* The code is distributed under GPLv3 license, see LICENSE file for details.
* Generated by Cypher Stack on 2023-05-26
*
*/
import 'package:flutter/material.dart';
import '../../themes/stack_colors.dart';
class DesktopDialog extends StatelessWidget {
const DesktopDialog({
2024-05-27 23:56:22 +00:00
super.key,
this.child,
this.maxWidth = 641,
this.maxHeight = 474,
2024-05-27 23:56:22 +00:00
});
final Widget? child;
final double maxWidth;
final double? maxHeight;
@override
Widget build(BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
ConstrainedBox(
constraints: BoxConstraints(
maxWidth: maxWidth,
maxHeight: maxHeight ?? MediaQuery.of(context).size.height - 64,
),
child: Material(
2022-11-16 18:09:19 +00:00
color: Colors.transparent,
borderRadius: BorderRadius.circular(
20,
),
child: Container(
decoration: BoxDecoration(
color: Theme.of(context).extension<StackColors>()!.popupBG,
borderRadius: BorderRadius.circular(
20,
),
),
child: child,
),
),
),
],
);
}
}