dev
dart 28 lines 674 Bytes
Raw
1 import 'package:flutter/material.dart';
2
3 class YatCloseButton extends StatelessWidget {
4 YatCloseButton({this.onClose});
5
6 final VoidCallback? onClose;
7
8 @override
9 Widget build(BuildContext context) {
10 return GestureDetector(
11 onTap: onClose,
12 child: Container(
13 height: 28,
14 width: 28,
15 alignment: Alignment.center,
16 decoration: BoxDecoration(
17 color: Theme.of(context).colorScheme.surfaceContainerHighest,
18 shape: BoxShape.circle,
19 ),
20 child: Icon(
21 Icons.clear,
22 color: Theme.of(context).colorScheme.onSecondaryContainer,
23 size: 20,
24 ),
25 ),
26 );
27 }
28 }