stack_wallet/lib/widgets/desktop/simple_desktop_dialog.dart

65 lines
1.7 KiB
Dart

import 'package:flutter/material.dart';
import 'package:stackwallet/utilities/text_styles.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
import 'package:stackwallet/widgets/desktop/primary_button.dart';
class SimpleDesktopDialog extends StatelessWidget {
const SimpleDesktopDialog({
Key? key,
required this.title,
required this.message,
}) : super(key: key);
final String title;
final String message;
@override
Widget build(BuildContext context) {
return DesktopDialog(
maxWidth: 500,
maxHeight: 300,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
title,
style: STextStyles.desktopH3(context),
),
const DesktopDialogCloseButton(),
],
),
const Spacer(),
Text(
message,
style: STextStyles.desktopTextSmall(context),
),
const Spacer(
flex: 2,
),
Row(
children: [
const Spacer(),
const SizedBox(
width: 16,
),
Expanded(
child: PrimaryButton(
label: "Ok",
buttonHeight: ButtonHeight.l,
onPressed: Navigator.of(
context,
rootNavigator: true,
).pop,
),
),
],
)
],
),
);
}
}