dev
dart 50 lines 1.38 KB
Raw
1 import 'package:cake_wallet/src/screens/wallet_connect/services/bottom_sheet_service.dart';
2 import 'package:flutter/material.dart';
3
4 class WCSheetHeader extends StatelessWidget {
5 const WCSheetHeader({super.key, required this.title});
6
7 final String title;
8
9 @override
10 Widget build(BuildContext context) {
11 final colors = Theme.of(context).colorScheme;
12
13 return SizedBox(
14 height: 40,
15 child: Stack(
16 alignment: Alignment.center,
17 children: [
18 Align(
19 alignment: AlignmentDirectional.centerStart,
20 child: InkResponse(
21 radius: 36,
22 onTap: () {
23 if (Navigator.canPop(context)) {
24 Navigator.of(context).pop(WCBottomSheetResult.reject);
25 }
26 },
27 child: Container(
28 width: 40,
29 height: 40,
30 decoration: BoxDecoration(
31 color: colors.surfaceContainerHighest,
32 shape: BoxShape.circle,
33 ),
34 child: Icon(
35 Icons.close,
36 size: 20,
37 color: colors.onSurface,
38 ),
39 ),
40 ),
41 ),
42 Text(
43 title,
44 style: Theme.of(context).textTheme.headlineMedium!.copyWith(letterSpacing: -0.09),
45 ),
46 ],
47 ),
48 );
49 }
50 }