| 1 | import 'package:cake_wallet/generated/i18n.dart'; |
| 2 | import 'package:flutter/material.dart'; |
| 3 | |
| 4 | class SelectDeselectAllBar extends StatelessWidget { |
| 5 | const SelectDeselectAllBar({super.key, required this.title, required this.onSelected}); |
| 6 | |
| 7 | final String title; |
| 8 | final Function(bool) onSelected; |
| 9 | |
| 10 | @override |
| 11 | Widget build(BuildContext context) { |
| 12 | return Row(mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ |
| 13 | Text( |
| 14 | title, |
| 15 | style: TextStyle( |
| 16 | fontSize: 14, |
| 17 | fontWeight: FontWeight.w400, |
| 18 | color: Theme.of(context).colorScheme.onSurfaceVariant), |
| 19 | ), |
| 20 | Row( |
| 21 | spacing: 20, |
| 22 | children: [ |
| 23 | GestureDetector( |
| 24 | onTap: () => onSelected(true), |
| 25 | child: Text( |
| 26 | S.of(context).select_all, |
| 27 | style: TextStyle(color: Theme.of(context).colorScheme.primary), |
| 28 | ), |
| 29 | ), |
| 30 | GestureDetector( |
| 31 | onTap: () => onSelected(false), |
| 32 | child: Text(S.of(context).unselect_all, |
| 33 | style: TextStyle(color: Theme.of(context).colorScheme.primary)), |
| 34 | ) |
| 35 | ], |
| 36 | ) |
| 37 | ]); |
| 38 | } |
| 39 | } |