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
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2022-09-26 15:49:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2024-05-23 00:37:06 +00:00
|
|
|
import '../../themes/stack_colors.dart';
|
2022-09-26 15:49:36 +00:00
|
|
|
|
|
|
|
class DesktopDialog extends StatelessWidget {
|
2022-10-27 21:23:31 +00:00
|
|
|
const DesktopDialog({
|
2024-05-27 23:56:22 +00:00
|
|
|
super.key,
|
2022-10-27 21:23:31 +00:00
|
|
|
this.child,
|
|
|
|
this.maxWidth = 641,
|
|
|
|
this.maxHeight = 474,
|
2024-05-27 23:56:22 +00:00
|
|
|
});
|
2022-09-26 15:49:36 +00:00
|
|
|
|
|
|
|
final Widget? child;
|
2022-10-27 21:23:31 +00:00
|
|
|
final double maxWidth;
|
2022-11-29 20:20:41 +00:00
|
|
|
final double? maxHeight;
|
2022-09-26 15:49:36 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
ConstrainedBox(
|
2022-10-27 21:23:31 +00:00
|
|
|
constraints: BoxConstraints(
|
|
|
|
maxWidth: maxWidth,
|
2022-11-29 20:20:41 +00:00
|
|
|
maxHeight: maxHeight ?? MediaQuery.of(context).size.height - 64,
|
2022-09-26 15:49:36 +00:00
|
|
|
),
|
|
|
|
child: Material(
|
2022-11-16 18:09:19 +00:00
|
|
|
color: Colors.transparent,
|
2022-09-26 15:49:36 +00:00
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
20,
|
|
|
|
),
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: Theme.of(context).extension<StackColors>()!.popupBG,
|
|
|
|
borderRadius: BorderRadius.circular(
|
|
|
|
20,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: child,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|