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 16:13:15 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
2024-05-23 00:37:06 +00:00
|
|
|
import '../../themes/stack_colors.dart';
|
|
|
|
import '../../utilities/assets.dart';
|
|
|
|
import '../custom_buttons/app_bar_icon_button.dart';
|
2022-09-26 16:13:15 +00:00
|
|
|
|
|
|
|
class DesktopDialogCloseButton extends StatelessWidget {
|
|
|
|
const DesktopDialogCloseButton({
|
2024-05-27 23:56:22 +00:00
|
|
|
super.key,
|
2022-09-26 16:13:15 +00:00
|
|
|
this.onPressedOverride,
|
2024-05-27 23:56:22 +00:00
|
|
|
});
|
2022-09-26 16:13:15 +00:00
|
|
|
|
|
|
|
final VoidCallback? onPressedOverride;
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Padding(
|
|
|
|
padding: const EdgeInsets.all(20.0),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
AppBarIconButton(
|
|
|
|
color:
|
|
|
|
Theme.of(context).extension<StackColors>()!.textFieldDefaultBG,
|
|
|
|
size: 40,
|
|
|
|
icon: SvgPicture.asset(
|
|
|
|
Assets.svg.x,
|
|
|
|
color: Theme.of(context).extension<StackColors>()!.textDark,
|
|
|
|
width: 22,
|
|
|
|
height: 22,
|
|
|
|
),
|
|
|
|
onPressed: () {
|
|
|
|
if (onPressedOverride == null) {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
} else {
|
|
|
|
onPressedOverride!.call();
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|