mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-20 22:28:46 +00:00
CAKE-334 | reworked unspent_coins_list_item.dart
This commit is contained in:
parent
800376b6b2
commit
a20969b650
16 changed files with 61 additions and 15 deletions
|
@ -86,9 +86,10 @@ class UnspentCoinsListFormState extends State<UnspentCoinsListForm> {
|
||||||
.pushNamed(Routes.unspentCoinsDetails,
|
.pushNamed(Routes.unspentCoinsDetails,
|
||||||
arguments: [item, unspentCoinsListViewModel]),
|
arguments: [item, unspentCoinsListViewModel]),
|
||||||
child: UnspentCoinsListItem(
|
child: UnspentCoinsListItem(
|
||||||
address: item.address,
|
note: item.note,
|
||||||
amount: item.amount,
|
amount: item.amount,
|
||||||
isSending: item.isSending,
|
isSending: item.isSending,
|
||||||
|
isFrozen: item.isFrozen,
|
||||||
onCheckBoxTap: item.isFrozen
|
onCheckBoxTap: item.isFrozen
|
||||||
? null
|
? null
|
||||||
: () async {
|
: () async {
|
||||||
|
|
|
@ -2,12 +2,14 @@ import 'package:auto_size_text/auto_size_text.dart';
|
||||||
import 'package:cake_wallet/palette.dart';
|
import 'package:cake_wallet/palette.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
|
||||||
class UnspentCoinsListItem extends StatelessWidget {
|
class UnspentCoinsListItem extends StatelessWidget {
|
||||||
UnspentCoinsListItem({
|
UnspentCoinsListItem({
|
||||||
@required this.address,
|
@required this.note,
|
||||||
@required this.amount,
|
@required this.amount,
|
||||||
@required this.isSending,
|
@required this.isSending,
|
||||||
|
@required this.isFrozen,
|
||||||
@required this.onCheckBoxTap,
|
@required this.onCheckBoxTap,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -16,9 +18,10 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
static const selectedItemColor = Palette.paleCornflowerBlue;
|
static const selectedItemColor = Palette.paleCornflowerBlue;
|
||||||
static const unselectedItemColor = Palette.moderateLavender;
|
static const unselectedItemColor = Palette.moderateLavender;
|
||||||
|
|
||||||
final String address;
|
final String note;
|
||||||
final String amount;
|
final String amount;
|
||||||
final bool isSending;
|
final bool isSending;
|
||||||
|
final bool isFrozen;
|
||||||
final Function() onCheckBoxTap;
|
final Function() onCheckBoxTap;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -51,7 +54,7 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
width: 1.0),
|
width: 1.0),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(8.0)),
|
Radius.circular(8.0)),
|
||||||
color: Theme.of(context).backgroundColor),
|
color: itemColor),
|
||||||
child: isSending
|
child: isSending
|
||||||
? Icon(
|
? Icon(
|
||||||
Icons.check,
|
Icons.check,
|
||||||
|
@ -64,10 +67,18 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: (note?.isNotEmpty ?? false)
|
||||||
|
? MainAxisAlignment.spaceBetween
|
||||||
|
: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
AutoSizeText(
|
Row(
|
||||||
|
mainAxisSize: MainAxisSize.max,
|
||||||
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: AutoSizeText(
|
||||||
amount,
|
amount,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: amountColor,
|
color: amountColor,
|
||||||
|
@ -76,13 +87,33 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
),
|
),
|
||||||
AutoSizeText(
|
),
|
||||||
address,
|
if (isFrozen) Container(
|
||||||
|
height: 17,
|
||||||
|
padding: EdgeInsets.only(left: 6, right: 6),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(8.5)),
|
||||||
|
color: Colors.white),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
S.of(context).frozen,
|
||||||
|
style: TextStyle(
|
||||||
|
color: amountColor,
|
||||||
|
fontSize: 7,
|
||||||
|
fontWeight: FontWeight.w600
|
||||||
|
),
|
||||||
|
)
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
if (note?.isNotEmpty ?? false) Text(
|
||||||
|
note,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: addressColor,
|
color: addressColor,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
),
|
),
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
overflow: TextOverflow.ellipsis
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Nicht ausgegebene Münzen",
|
"unspent_coins_title" : "Nicht ausgegebene Münzen",
|
||||||
"unspent_coins_details_title" : "Details zu nicht ausgegebenen Münzen",
|
"unspent_coins_details_title" : "Details zu nicht ausgegebenen Münzen",
|
||||||
"freeze" : "Einfrieren",
|
"freeze" : "Einfrieren",
|
||||||
|
"frozen" : "Gefroren",
|
||||||
"coin_control" : "Münzkontrolle (optional)",
|
"coin_control" : "Münzkontrolle (optional)",
|
||||||
|
|
||||||
"address_detected" : "Adresse erkannt",
|
"address_detected" : "Adresse erkannt",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Unspent coins",
|
"unspent_coins_title" : "Unspent coins",
|
||||||
"unspent_coins_details_title" : "Unspent coins details",
|
"unspent_coins_details_title" : "Unspent coins details",
|
||||||
"freeze" : "Freeze",
|
"freeze" : "Freeze",
|
||||||
|
"frozen" : "Frozen",
|
||||||
"coin_control" : "Coin control (optional)",
|
"coin_control" : "Coin control (optional)",
|
||||||
|
|
||||||
"address_detected" : "Address detected",
|
"address_detected" : "Address detected",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Monedas no gastadas",
|
"unspent_coins_title" : "Monedas no gastadas",
|
||||||
"unspent_coins_details_title" : "Detalles de monedas no gastadas",
|
"unspent_coins_details_title" : "Detalles de monedas no gastadas",
|
||||||
"freeze" : "Congelar",
|
"freeze" : "Congelar",
|
||||||
|
"frozen" : "Congelada",
|
||||||
"coin_control" : "Control de monedas (opcional)",
|
"coin_control" : "Control de monedas (opcional)",
|
||||||
|
|
||||||
"address_detected" : "Dirección detectada",
|
"address_detected" : "Dirección detectada",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "खर्च न किए गए सिक्के",
|
"unspent_coins_title" : "खर्च न किए गए सिक्के",
|
||||||
"unspent_coins_details_title" : "अव्ययित सिक्कों का विवरण",
|
"unspent_coins_details_title" : "अव्ययित सिक्कों का विवरण",
|
||||||
"freeze" : "फ्रीज",
|
"freeze" : "फ्रीज",
|
||||||
|
"frozen" : "जमा हुआ",
|
||||||
"coin_control" : "सिक्का नियंत्रण (वैकल्पिक)",
|
"coin_control" : "सिक्का नियंत्रण (वैकल्पिक)",
|
||||||
|
|
||||||
"address_detected" : "पता लग गया",
|
"address_detected" : "पता लग गया",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Nepotrošeni novčići",
|
"unspent_coins_title" : "Nepotrošeni novčići",
|
||||||
"unspent_coins_details_title" : "Nepotrošeni detalji o novčićima",
|
"unspent_coins_details_title" : "Nepotrošeni detalji o novčićima",
|
||||||
"freeze" : "Zamrznuti",
|
"freeze" : "Zamrznuti",
|
||||||
|
"frozen" : "Smrznuto",
|
||||||
"coin_control" : "Kontrola novca (nije obavezno)",
|
"coin_control" : "Kontrola novca (nije obavezno)",
|
||||||
|
|
||||||
"address_detected" : "Adresa je otkrivena",
|
"address_detected" : "Adresa je otkrivena",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Monete non spese",
|
"unspent_coins_title" : "Monete non spese",
|
||||||
"unspent_coins_details_title" : "Dettagli sulle monete non spese",
|
"unspent_coins_details_title" : "Dettagli sulle monete non spese",
|
||||||
"freeze" : "Congelare",
|
"freeze" : "Congelare",
|
||||||
|
"frozen" : "Congelato",
|
||||||
"coin_control" : "Controllo monete (opzionale)",
|
"coin_control" : "Controllo monete (opzionale)",
|
||||||
|
|
||||||
"address_detected" : "Indirizzo rilevato",
|
"address_detected" : "Indirizzo rilevato",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "未使用のコイン",
|
"unspent_coins_title" : "未使用のコイン",
|
||||||
"unspent_coins_details_title" : "未使用のコインの詳細",
|
"unspent_coins_details_title" : "未使用のコインの詳細",
|
||||||
"freeze" : "氷結",
|
"freeze" : "氷結",
|
||||||
|
"frozen" : "凍った",
|
||||||
"coin_control" : "コインコントロール(オプション)",
|
"coin_control" : "コインコントロール(オプション)",
|
||||||
|
|
||||||
"address_detected" : "アドレスが検出されました",
|
"address_detected" : "アドレスが検出されました",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "사용하지 않은 동전",
|
"unspent_coins_title" : "사용하지 않은 동전",
|
||||||
"unspent_coins_details_title" : "사용하지 않은 동전 세부 정보",
|
"unspent_coins_details_title" : "사용하지 않은 동전 세부 정보",
|
||||||
"freeze" : "얼다",
|
"freeze" : "얼다",
|
||||||
|
"frozen" : "겨울 왕국",
|
||||||
"coin_control" : "코인 제어 (옵션)",
|
"coin_control" : "코인 제어 (옵션)",
|
||||||
|
|
||||||
"address_detected" : "주소 감지",
|
"address_detected" : "주소 감지",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Ongebruikte munten",
|
"unspent_coins_title" : "Ongebruikte munten",
|
||||||
"unspent_coins_details_title" : "Details van niet-uitgegeven munten",
|
"unspent_coins_details_title" : "Details van niet-uitgegeven munten",
|
||||||
"freeze" : "Bevriezen",
|
"freeze" : "Bevriezen",
|
||||||
|
"frozen" : "Bevroren",
|
||||||
"coin_control" : "Muntcontrole (optioneel)",
|
"coin_control" : "Muntcontrole (optioneel)",
|
||||||
|
|
||||||
"address_detected" : "Adres gedetecteerd",
|
"address_detected" : "Adres gedetecteerd",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Niewydane monety",
|
"unspent_coins_title" : "Niewydane monety",
|
||||||
"unspent_coins_details_title" : "Szczegóły niewydanych monet",
|
"unspent_coins_details_title" : "Szczegóły niewydanych monet",
|
||||||
"freeze" : "Zamrażać",
|
"freeze" : "Zamrażać",
|
||||||
|
"frozen" : "Mrożony",
|
||||||
"coin_control" : "Kontrola monet (opcjonalnie)",
|
"coin_control" : "Kontrola monet (opcjonalnie)",
|
||||||
|
|
||||||
"address_detected" : "Wykryto adres",
|
"address_detected" : "Wykryto adres",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Moedas não gastas",
|
"unspent_coins_title" : "Moedas não gastas",
|
||||||
"unspent_coins_details_title" : "Detalhes de moedas não gastas",
|
"unspent_coins_details_title" : "Detalhes de moedas não gastas",
|
||||||
"freeze" : "Congelar",
|
"freeze" : "Congelar",
|
||||||
|
"frozen" : "Congeladas",
|
||||||
"coin_control" : "Controle de moedas (opcional)",
|
"coin_control" : "Controle de moedas (opcional)",
|
||||||
|
|
||||||
"address_detected" : "Endereço detectado",
|
"address_detected" : "Endereço detectado",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Неизрасходованные монеты",
|
"unspent_coins_title" : "Неизрасходованные монеты",
|
||||||
"unspent_coins_details_title" : "Сведения о неизрасходованных монетах",
|
"unspent_coins_details_title" : "Сведения о неизрасходованных монетах",
|
||||||
"freeze" : "Заморозить",
|
"freeze" : "Заморозить",
|
||||||
|
"frozen" : "Заморожено",
|
||||||
"coin_control" : "Контроль монет (необязательно)",
|
"coin_control" : "Контроль монет (необязательно)",
|
||||||
|
|
||||||
"address_detected" : "Обнаружен адрес",
|
"address_detected" : "Обнаружен адрес",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "Невитрачені монети",
|
"unspent_coins_title" : "Невитрачені монети",
|
||||||
"unspent_coins_details_title" : "Відомості про невитрачені монети",
|
"unspent_coins_details_title" : "Відомості про невитрачені монети",
|
||||||
"freeze" : "Заморозити",
|
"freeze" : "Заморозити",
|
||||||
|
"frozen" : "Заморожено",
|
||||||
"coin_control" : "Контроль монет (необов’язково)",
|
"coin_control" : "Контроль монет (необов’язково)",
|
||||||
|
|
||||||
"address_detected" : "Виявлено адресу",
|
"address_detected" : "Виявлено адресу",
|
||||||
|
|
|
@ -488,6 +488,7 @@
|
||||||
"unspent_coins_title" : "未使用的硬幣",
|
"unspent_coins_title" : "未使用的硬幣",
|
||||||
"unspent_coins_details_title" : "未使用代幣詳情",
|
"unspent_coins_details_title" : "未使用代幣詳情",
|
||||||
"freeze" : "凍結",
|
"freeze" : "凍結",
|
||||||
|
"frozen" : "凍結的",
|
||||||
"coin_control" : "硬幣控制(可選)",
|
"coin_control" : "硬幣控制(可選)",
|
||||||
|
|
||||||
"address_detected" : "檢測到地址",
|
"address_detected" : "檢測到地址",
|
||||||
|
|
Loading…
Reference in a new issue