mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-06 04:17:42 +00:00
45 lines
1.3 KiB
Dart
45 lines
1.3 KiB
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:flutter_svg/flutter_svg.dart';
|
||
|
import 'package:stackwallet/utilities/assets.dart';
|
||
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||
|
|
||
|
class DesktopDialogCloseButton extends StatelessWidget {
|
||
|
const DesktopDialogCloseButton({
|
||
|
Key? key,
|
||
|
this.onPressedOverride,
|
||
|
}) : super(key: key);
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
},
|
||
|
),
|
||
|
],
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|