mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-13 09:04:09 +01:00
* fix: Fix issues surrounding polygon release * Add polygon generation command to pubspec script * Remove unnecesary cast * fix: Remove unneeded code * fix: Adjust workflow file to pick polygonScan apikey * fix: Issues noticed while testing * fix: Issues noticed while testing * fix: Transaction should reflect the token name * fix: Remove unused import * feat: Add alchemy node to default migration settings * Fix sending Polygon delay Remove alchemy node Minor Enhancements * Remove scrolling from multiple choices settings row and make them fill the whole space [skip ci] * Add USDT poly Add icon for USDC.e * Fix ERC20 tokens overriding old wallets Add USDC.e to exchange * - Remove unnecessary code - Minor Enhancements --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
79 lines
2.9 KiB
Dart
79 lines
2.9 KiB
Dart
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
|
import 'package:cake_wallet/view_model/settings/choices_list_item.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:cake_wallet/themes/extensions/address_theme.dart';
|
|
|
|
class SettingsChoicesCell extends StatelessWidget {
|
|
const SettingsChoicesCell(this.choicesListItem, {Key? key}) : super(key: key);
|
|
|
|
final ChoicesListItem<dynamic> choicesListItem;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
color: Theme.of(context).colorScheme.background,
|
|
padding: EdgeInsets.all(24),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Text(
|
|
choicesListItem.title,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.normal,
|
|
color: Theme.of(context).extension<CakeTextTheme>()!.titleColor,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 24),
|
|
Center(
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(30),
|
|
color: Theme.of(context).extension<AddressTheme>()!.actionButtonColor,
|
|
),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: choicesListItem.items.map((dynamic e) {
|
|
final isSelected = choicesListItem.selectedItem == e;
|
|
return Expanded(
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
choicesListItem.onItemSelected.call(e);
|
|
},
|
|
child: Container(
|
|
padding: EdgeInsets.symmetric(vertical: 8),
|
|
decoration: BoxDecoration(
|
|
borderRadius: BorderRadius.circular(30),
|
|
color: isSelected
|
|
? Theme.of(context).primaryColor
|
|
: null,
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
choicesListItem.displayItem.call(e),
|
|
style: TextStyle(
|
|
color: isSelected
|
|
? Colors.white
|
|
: Theme.of(context).extension<CakeTextTheme>()!.secondaryTextColor,
|
|
fontWeight: isSelected ? FontWeight.w700 : FontWeight.normal,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}).toList(),
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|