dev
dart 37 lines 1009 Bytes
Raw
1 import 'package:cake_wallet/generated/i18n.dart';
2 import 'package:cake_wallet/src/widgets/cake_image_widget.dart';
3 import 'package:flutter/material.dart';
4
5 class SwapModalHeader extends StatelessWidget {
6 const SwapModalHeader({super.key, required this.fromIconPath, required this.toIconPath});
7
8 final String fromIconPath;
9 final String toIconPath;
10
11 @override
12 Widget build(BuildContext context) {
13 return Row(
14 spacing: 8,
15 children: [
16 SizedBox(
17 height: 36,
18 width: 36,
19 child: Stack(
20 children: [
21 CakeImageWidget(imageUrl: fromIconPath, width: 24, height: 24),
22 Positioned(
23 top: 12,
24 left: 12,
25 child: CakeImageWidget(imageUrl: toIconPath, width: 24, height: 24),
26 ),
27 ],
28 ),
29 ),
30 Text(
31 S.of(context).swap,
32 style: TextStyle(fontSize: 20, fontWeight: FontWeight.w500),
33 )
34 ],
35 );
36 }
37 }