dev
dart 56 lines 1.73 KB
Raw
1 import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:flutter/material.dart';
3
4 class WCScamBanner extends StatelessWidget {
5 const WCScamBanner({super.key});
6
7 @override
8 Widget build(BuildContext context) {
9 final colors = Theme.of(context).colorScheme;
10
11 return Container(
12 width: double.infinity,
13 decoration: BoxDecoration(
14 color: colors.errorContainer,
15 border: Border.all(color: colors.onError, width: 2),
16 borderRadius: BorderRadius.circular(20),
17 ),
18 padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 16),
19 child: Row(
20 crossAxisAlignment: CrossAxisAlignment.center,
21 children: [
22 Icon(
23 Icons.warning_amber_rounded,
24 size: 36,
25 color: colors.error,
26 ),
27 const SizedBox(width: 16),
28 Expanded(
29 child: Column(
30 crossAxisAlignment: CrossAxisAlignment.center,
31 mainAxisSize: MainAxisSize.min,
32 children: [
33 Text(
34 S.of(context).wc_scam_warning_title,
35 textAlign: TextAlign.center,
36 style: Theme.of(context).textTheme.titleSmall!.copyWith(
37 color: colors.error,
38 letterSpacing: -0.06,
39 ),
40 ),
41 const SizedBox(height: 4),
42 Text(
43 S.of(context).wc_scam_warning_message,
44 textAlign: TextAlign.center,
45 style: Theme.of(context).textTheme.bodySmall!.copyWith(
46 color: colors.error,
47 ),
48 ),
49 ],
50 ),
51 ),
52 ],
53 ),
54 );
55 }
56 }