|
@@ -136,44 +136,54 @@ class _AssetScreenState extends ConsumerState<AssetScreen>
|
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
final state = ref.watch(assetProvider);
|
|
final state = ref.watch(assetProvider);
|
|
|
final notifier = ref.read(assetProvider.notifier);
|
|
final notifier = ref.read(assetProvider.notifier);
|
|
|
|
|
+ final isChineseLocale =
|
|
|
|
|
+ Localizations.localeOf(context).languageCode == 'zh';
|
|
|
|
|
+ final tabs = _getLocalizedTabs(context);
|
|
|
|
|
|
|
|
return Scaffold(
|
|
return Scaffold(
|
|
|
body: SafeArea(
|
|
body: SafeArea(
|
|
|
- child: Column(
|
|
|
|
|
- children: [
|
|
|
|
|
- // ── Tab 栏 ─────────────────────────────────────
|
|
|
|
|
- TabBar(
|
|
|
|
|
|
|
+ child: Column(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ // ── Tab 栏 ─────────────────────────────────────
|
|
|
|
|
+ TabBar(
|
|
|
|
|
+ controller: _tabController,
|
|
|
|
|
+ isScrollable: !isChineseLocale,
|
|
|
|
|
+ indicator: StretchTabIndicator(
|
|
|
controller: _tabController,
|
|
controller: _tabController,
|
|
|
- isScrollable: true,
|
|
|
|
|
- indicator: StretchTabIndicator(
|
|
|
|
|
- controller: _tabController,
|
|
|
|
|
- color: AppColors.brand,
|
|
|
|
|
- height: 3,
|
|
|
|
|
- borderRadius: 1.5,
|
|
|
|
|
- ),
|
|
|
|
|
- indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
|
- labelStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w700),
|
|
|
|
|
- unselectedLabelStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
|
|
|
|
|
- tabAlignment: TabAlignment.start,
|
|
|
|
|
- dividerColor: Colors.transparent,
|
|
|
|
|
- labelPadding: const EdgeInsets.symmetric(horizontal: 14),
|
|
|
|
|
- padding: const EdgeInsets.fromLTRB(4, 8, 16, 0),
|
|
|
|
|
- tabs: <Widget>[
|
|
|
|
|
- for (int i = 0; i < 6; i++)
|
|
|
|
|
- Semantics(
|
|
|
|
|
- label: _getTabLabel(i),
|
|
|
|
|
- button: true,
|
|
|
|
|
- child: Tab(text: _getLocalizedTabs(context)[i]),
|
|
|
|
|
- ),
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ color: AppColors.brand,
|
|
|
|
|
+ height: 3,
|
|
|
|
|
+ borderRadius: 1.5,
|
|
|
),
|
|
),
|
|
|
|
|
+ indicatorSize: TabBarIndicatorSize.label,
|
|
|
|
|
+ labelStyle:
|
|
|
|
|
+ const TextStyle(fontSize: 16, fontWeight: FontWeight.w700),
|
|
|
|
|
+ unselectedLabelStyle:
|
|
|
|
|
+ const TextStyle(fontSize: 16, fontWeight: FontWeight.w400),
|
|
|
|
|
+ tabAlignment:
|
|
|
|
|
+ isChineseLocale ? TabAlignment.fill : TabAlignment.start,
|
|
|
|
|
+ dividerColor: Colors.transparent,
|
|
|
|
|
+ labelPadding: isChineseLocale
|
|
|
|
|
+ ? EdgeInsets.zero
|
|
|
|
|
+ : const EdgeInsets.symmetric(horizontal: 14),
|
|
|
|
|
+ padding: isChineseLocale
|
|
|
|
|
+ ? const EdgeInsets.only(top: 8)
|
|
|
|
|
+ : const EdgeInsets.fromLTRB(4, 8, 16, 0),
|
|
|
|
|
+ tabs: <Widget>[
|
|
|
|
|
+ for (int i = 0; i < 6; i++)
|
|
|
|
|
+ Semantics(
|
|
|
|
|
+ label: _getTabLabel(i),
|
|
|
|
|
+ button: true,
|
|
|
|
|
+ child: Tab(text: tabs[i]),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
|
|
|
- // ── Tab 内容 ───────────────────────────────────
|
|
|
|
|
- Expanded(
|
|
|
|
|
- child: _buildContent(state, notifier),
|
|
|
|
|
- ),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
|
|
+ // ── Tab 内容 ───────────────────────────────────
|
|
|
|
|
+ Expanded(
|
|
|
|
|
+ child: _buildContent(state, notifier),
|
|
|
|
|
+ ),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
@@ -229,34 +239,37 @@ class _AssetShimmer extends StatelessWidget {
|
|
|
shimmerBox(120, 13),
|
|
shimmerBox(120, 13),
|
|
|
const SizedBox(height: 24),
|
|
const SizedBox(height: 24),
|
|
|
// 账户卡片列表
|
|
// 账户卡片列表
|
|
|
- ...List.generate(3, (_) => Padding(
|
|
|
|
|
- padding: const EdgeInsets.only(bottom: 12),
|
|
|
|
|
- child: Container(
|
|
|
|
|
- padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- color: Colors.white,
|
|
|
|
|
- borderRadius: BorderRadius.circular(12),
|
|
|
|
|
- ),
|
|
|
|
|
- child: Row(
|
|
|
|
|
- children: [
|
|
|
|
|
- shimmerCircle(22),
|
|
|
|
|
- const SizedBox(width: 12),
|
|
|
|
|
- shimmerBox(80, 14),
|
|
|
|
|
- const Spacer(),
|
|
|
|
|
- Column(
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
- children: [
|
|
|
|
|
- shimmerBox(90, 15),
|
|
|
|
|
- const SizedBox(height: 4),
|
|
|
|
|
- shimmerBox(60, 12),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- const SizedBox(width: 8),
|
|
|
|
|
- shimmerBox(18, 18, radius: 4),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- ),
|
|
|
|
|
- )),
|
|
|
|
|
|
|
+ ...List.generate(
|
|
|
|
|
+ 3,
|
|
|
|
|
+ (_) => Padding(
|
|
|
|
|
+ padding: const EdgeInsets.only(bottom: 12),
|
|
|
|
|
+ child: Container(
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(
|
|
|
|
|
+ horizontal: 16, vertical: 16),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ borderRadius: BorderRadius.circular(12),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Row(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ shimmerCircle(22),
|
|
|
|
|
+ const SizedBox(width: 12),
|
|
|
|
|
+ shimmerBox(80, 14),
|
|
|
|
|
+ const Spacer(),
|
|
|
|
|
+ Column(
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ shimmerBox(90, 15),
|
|
|
|
|
+ const SizedBox(height: 4),
|
|
|
|
|
+ shimmerBox(60, 12),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ const SizedBox(width: 8),
|
|
|
|
|
+ shimmerBox(18, 18, radius: 4),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ ),
|
|
|
|
|
+ )),
|
|
|
const SizedBox(height: 8),
|
|
const SizedBox(height: 8),
|
|
|
// 持仓卡片
|
|
// 持仓卡片
|
|
|
Container(
|
|
Container(
|
|
@@ -274,7 +287,8 @@ class _AssetShimmer extends StatelessWidget {
|
|
|
const SizedBox(height: 12),
|
|
const SizedBox(height: 12),
|
|
|
Row(
|
|
Row(
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
- children: List.generate(3, (_) => shimmerBox(70, 40, radius: 6)),
|
|
|
|
|
|
|
+ children:
|
|
|
|
|
+ List.generate(3, (_) => shimmerBox(70, 40, radius: 6)),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
@@ -300,7 +314,8 @@ class AssetHeader extends StatelessWidget {
|
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
|
final cs = Theme.of(context).colorScheme;
|
|
final cs = Theme.of(context).colorScheme;
|
|
|
final total = state.totalUsdtValue;
|
|
final total = state.totalUsdtValue;
|
|
|
- final display = state.obscureBalance ? '******' : formatPrice(total, decimalPlaces: 2);
|
|
|
|
|
|
|
+ final display =
|
|
|
|
|
+ state.obscureBalance ? '******' : formatPrice(total, decimalPlaces: 2);
|
|
|
|
|
|
|
|
return Padding(
|
|
return Padding(
|
|
|
padding: const EdgeInsets.fromLTRB(16, 20, 16, 0),
|
|
padding: const EdgeInsets.fromLTRB(16, 20, 16, 0),
|
|
@@ -309,7 +324,9 @@ class AssetHeader extends StatelessWidget {
|
|
|
children: [
|
|
children: [
|
|
|
Row(
|
|
Row(
|
|
|
children: [
|
|
children: [
|
|
|
- Text(AppLocalizations.of(context)!.assetValuation, style: TextStyle(color: cs.onSurface.withAlpha(153), fontSize: 13)),
|
|
|
|
|
|
|
+ Text(AppLocalizations.of(context)!.assetValuation,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface.withAlpha(153), fontSize: 13)),
|
|
|
const SizedBox(width: 6),
|
|
const SizedBox(width: 6),
|
|
|
Semantics(
|
|
Semantics(
|
|
|
label: 'asset_btn_toggle_balance',
|
|
label: 'asset_btn_toggle_balance',
|
|
@@ -319,8 +336,11 @@ class AssetHeader extends StatelessWidget {
|
|
|
child: GestureDetector(
|
|
child: GestureDetector(
|
|
|
onTap: notifier.toggleObscure,
|
|
onTap: notifier.toggleObscure,
|
|
|
child: Icon(
|
|
child: Icon(
|
|
|
- state.obscureBalance ? Icons.visibility_off_outlined : Icons.visibility_outlined,
|
|
|
|
|
- size: 16, color: cs.onSurface.withAlpha(153),
|
|
|
|
|
|
|
+ state.obscureBalance
|
|
|
|
|
+ ? Icons.visibility_off_outlined
|
|
|
|
|
+ : Icons.visibility_outlined,
|
|
|
|
|
+ size: 16,
|
|
|
|
|
+ color: cs.onSurface.withAlpha(153),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
@@ -333,7 +353,12 @@ class AssetHeader extends StatelessWidget {
|
|
|
Semantics(
|
|
Semantics(
|
|
|
label: 'asset_text_total_value',
|
|
label: 'asset_text_total_value',
|
|
|
enabled: true,
|
|
enabled: true,
|
|
|
- child: Text(display, style: TextStyle(color: cs.onSurface, fontSize: 32, fontWeight: FontWeight.w700, letterSpacing: -0.5)),
|
|
|
|
|
|
|
+ child: Text(display,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface,
|
|
|
|
|
+ fontSize: 32,
|
|
|
|
|
+ fontWeight: FontWeight.w700,
|
|
|
|
|
+ letterSpacing: -0.5)),
|
|
|
),
|
|
),
|
|
|
const SizedBox(width: 6),
|
|
const SizedBox(width: 6),
|
|
|
Semantics(
|
|
Semantics(
|
|
@@ -341,7 +366,9 @@ class AssetHeader extends StatelessWidget {
|
|
|
enabled: true,
|
|
enabled: true,
|
|
|
child: Padding(
|
|
child: Padding(
|
|
|
padding: const EdgeInsets.only(bottom: 5),
|
|
padding: const EdgeInsets.only(bottom: 5),
|
|
|
- child: Text('USDT', style: TextStyle(color: cs.onSurface.withAlpha(153), fontSize: 14)),
|
|
|
|
|
|
|
+ child: Text('USDT',
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface.withAlpha(153), fontSize: 14)),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
@@ -391,7 +418,9 @@ class AssetPositionCard extends StatelessWidget {
|
|
|
decoration: BoxDecoration(
|
|
decoration: BoxDecoration(
|
|
|
color: isDark ? AppColors.darkBgSecondary : AppColors.lightBgSecondary,
|
|
color: isDark ? AppColors.darkBgSecondary : AppColors.lightBgSecondary,
|
|
|
borderRadius: BorderRadius.circular(12),
|
|
borderRadius: BorderRadius.circular(12),
|
|
|
- border: isDark ? null : Border.all(color: AppColors.lightBorder, width: 0.5),
|
|
|
|
|
|
|
+ border: isDark
|
|
|
|
|
+ ? null
|
|
|
|
|
+ : Border.all(color: AppColors.lightBorder, width: 0.5),
|
|
|
),
|
|
),
|
|
|
child: Column(
|
|
child: Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
@@ -400,15 +429,27 @@ class AssetPositionCard extends StatelessWidget {
|
|
|
Row(
|
|
Row(
|
|
|
children: [
|
|
children: [
|
|
|
Container(
|
|
Container(
|
|
|
- width: 32, height: 32,
|
|
|
|
|
- decoration: BoxDecoration(color: sideColor, borderRadius: BorderRadius.circular(8)),
|
|
|
|
|
|
|
+ width: 32,
|
|
|
|
|
+ height: 32,
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color: sideColor, borderRadius: BorderRadius.circular(8)),
|
|
|
child: Center(
|
|
child: Center(
|
|
|
- child: Text(isLong ? AppLocalizations.of(context)!.longLabel : AppLocalizations.of(context)!.shortLabel,
|
|
|
|
|
- style: const TextStyle(color: Colors.white, fontSize: 13, fontWeight: FontWeight.w700)),
|
|
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ isLong
|
|
|
|
|
+ ? AppLocalizations.of(context)!.longLabel
|
|
|
|
|
+ : AppLocalizations.of(context)!.shortLabel,
|
|
|
|
|
+ style: const TextStyle(
|
|
|
|
|
+ color: Colors.white,
|
|
|
|
|
+ fontSize: 13,
|
|
|
|
|
+ fontWeight: FontWeight.w700)),
|
|
|
),
|
|
),
|
|
|
),
|
|
),
|
|
|
const SizedBox(width: 10),
|
|
const SizedBox(width: 10),
|
|
|
- Text(symbol, style: TextStyle(color: cs.onSurface, fontSize: 15, fontWeight: FontWeight.w600)),
|
|
|
|
|
|
|
+ Text(symbol,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface,
|
|
|
|
|
+ fontSize: 15,
|
|
|
|
|
+ fontWeight: FontWeight.w600)),
|
|
|
const SizedBox(width: 8),
|
|
const SizedBox(width: 8),
|
|
|
_Tag(label: AppLocalizations.of(context)!.perpetual),
|
|
_Tag(label: AppLocalizations.of(context)!.perpetual),
|
|
|
const SizedBox(width: 4),
|
|
const SizedBox(width: 4),
|
|
@@ -420,12 +461,17 @@ class AssetPositionCard extends StatelessWidget {
|
|
|
color: cs.onSurface.withAlpha(20),
|
|
color: cs.onSurface.withAlpha(20),
|
|
|
borderRadius: BorderRadius.circular(4),
|
|
borderRadius: BorderRadius.circular(4),
|
|
|
),
|
|
),
|
|
|
- child: Text(leverage, style: TextStyle(color: cs.onSurface, fontSize: 11, fontWeight: FontWeight.w600)),
|
|
|
|
|
|
|
+ child: Text(leverage,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface,
|
|
|
|
|
+ fontSize: 11,
|
|
|
|
|
+ fontWeight: FontWeight.w600)),
|
|
|
),
|
|
),
|
|
|
const Spacer(),
|
|
const Spacer(),
|
|
|
GestureDetector(
|
|
GestureDetector(
|
|
|
onTap: onShare,
|
|
onTap: onShare,
|
|
|
- child: Icon(Icons.share_outlined, size: 18, color: cs.onSurface.withAlpha(153)),
|
|
|
|
|
|
|
+ child: Icon(Icons.share_outlined,
|
|
|
|
|
+ size: 18, color: cs.onSurface.withAlpha(153)),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
@@ -441,20 +487,32 @@ class AssetPositionCard extends StatelessWidget {
|
|
|
Column(
|
|
Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
children: [
|
|
children: [
|
|
|
- Text('${AppLocalizations.of(context)!.unrealizedPnl} (USDT)', style: TextStyle(color: cs.onSurface.withAlpha(153), fontSize: 11)),
|
|
|
|
|
|
|
+ Text(
|
|
|
|
|
+ '${AppLocalizations.of(context)!.unrealizedPnl} (USDT)',
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface.withAlpha(153), fontSize: 11)),
|
|
|
const SizedBox(height: 2),
|
|
const SizedBox(height: 2),
|
|
|
Text(
|
|
Text(
|
|
|
obscure ? '******' : pnl,
|
|
obscure ? '******' : pnl,
|
|
|
- style: TextStyle(color: effectivePnlColor, fontSize: 20, fontWeight: FontWeight.w700),
|
|
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: effectivePnlColor,
|
|
|
|
|
+ fontSize: 20,
|
|
|
|
|
+ fontWeight: FontWeight.w700),
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
Column(
|
|
Column(
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
children: [
|
|
children: [
|
|
|
- Text(AppLocalizations.of(context)!.returnRate, style: TextStyle(color: cs.onSurface.withAlpha(153), fontSize: 11)),
|
|
|
|
|
|
|
+ Text(AppLocalizations.of(context)!.returnRate,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface.withAlpha(153), fontSize: 11)),
|
|
|
const SizedBox(height: 2),
|
|
const SizedBox(height: 2),
|
|
|
- Text(roi, style: TextStyle(color: effectivePnlColor, fontSize: 16, fontWeight: FontWeight.w600)),
|
|
|
|
|
|
|
+ Text(roi,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: effectivePnlColor,
|
|
|
|
|
+ fontSize: 16,
|
|
|
|
|
+ fontWeight: FontWeight.w600)),
|
|
|
],
|
|
],
|
|
|
),
|
|
),
|
|
|
],
|
|
],
|
|
@@ -496,57 +554,66 @@ class AssetAccountRow extends StatelessWidget {
|
|
|
onTap: onTap,
|
|
onTap: onTap,
|
|
|
behavior: HitTestBehavior.opaque,
|
|
behavior: HitTestBehavior.opaque,
|
|
|
child: Container(
|
|
child: Container(
|
|
|
- padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
- decoration: BoxDecoration(
|
|
|
|
|
- color: isDark ? AppColors.darkBgSecondary : AppColors.lightBgSecondary,
|
|
|
|
|
- borderRadius: BorderRadius.circular(12),
|
|
|
|
|
- border: isDark ? null : Border.all(color: AppColors.lightBorder, width: 0.5),
|
|
|
|
|
- ),
|
|
|
|
|
- child: Row(
|
|
|
|
|
- children: [
|
|
|
|
|
- Icon(icon, color: cs.onSurface.withAlpha(153), size: 22),
|
|
|
|
|
- const SizedBox(width: 12),
|
|
|
|
|
- Expanded(
|
|
|
|
|
- child: Text(label,
|
|
|
|
|
- style: TextStyle(
|
|
|
|
|
- color: cs.onSurface,
|
|
|
|
|
- fontSize: 14,
|
|
|
|
|
- fontWeight: FontWeight.w500)),
|
|
|
|
|
- ),
|
|
|
|
|
- if (onTransfer != null) ...[
|
|
|
|
|
- OutlinedButton(
|
|
|
|
|
- onPressed: onTransfer,
|
|
|
|
|
- style: OutlinedButton.styleFrom(
|
|
|
|
|
- side: const BorderSide(color: AppColors.brand),
|
|
|
|
|
- foregroundColor: AppColors.brand,
|
|
|
|
|
- minimumSize: const Size(0, 32),
|
|
|
|
|
- padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
- tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
|
- ),
|
|
|
|
|
- child: Text(
|
|
|
|
|
- AppLocalizations.of(context)!.transfer,
|
|
|
|
|
- style: const TextStyle(fontSize: 12),
|
|
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
|
|
|
+ decoration: BoxDecoration(
|
|
|
|
|
+ color:
|
|
|
|
|
+ isDark ? AppColors.darkBgSecondary : AppColors.lightBgSecondary,
|
|
|
|
|
+ borderRadius: BorderRadius.circular(12),
|
|
|
|
|
+ border: isDark
|
|
|
|
|
+ ? null
|
|
|
|
|
+ : Border.all(color: AppColors.lightBorder, width: 0.5),
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Row(
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Icon(icon, color: cs.onSurface.withAlpha(153), size: 22),
|
|
|
|
|
+ const SizedBox(width: 12),
|
|
|
|
|
+ Expanded(
|
|
|
|
|
+ child: Text(label,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface,
|
|
|
|
|
+ fontSize: 14,
|
|
|
|
|
+ fontWeight: FontWeight.w500)),
|
|
|
|
|
+ ),
|
|
|
|
|
+ if (onTransfer != null) ...[
|
|
|
|
|
+ OutlinedButton(
|
|
|
|
|
+ onPressed: onTransfer,
|
|
|
|
|
+ style: OutlinedButton.styleFrom(
|
|
|
|
|
+ side: const BorderSide(color: AppColors.brand),
|
|
|
|
|
+ foregroundColor: AppColors.brand,
|
|
|
|
|
+ minimumSize: const Size(0, 32),
|
|
|
|
|
+ padding: const EdgeInsets.symmetric(horizontal: 12),
|
|
|
|
|
+ tapTargetSize: MaterialTapTargetSize.shrinkWrap,
|
|
|
|
|
+ ),
|
|
|
|
|
+ child: Text(
|
|
|
|
|
+ AppLocalizations.of(context)!.transfer,
|
|
|
|
|
+ style: const TextStyle(fontSize: 12),
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
|
|
+ const SizedBox(width: 12),
|
|
|
|
|
+ ],
|
|
|
|
|
+ Column(
|
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
+ children: [
|
|
|
|
|
+ Text(amount,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface,
|
|
|
|
|
+ fontSize: 15,
|
|
|
|
|
+ fontWeight: FontWeight.w600)),
|
|
|
|
|
+ if (usdAmount.isNotEmpty)
|
|
|
|
|
+ Text(usdAmount,
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface.withAlpha(120), fontSize: 12)),
|
|
|
|
|
+ ],
|
|
|
|
|
+ ),
|
|
|
|
|
+ const SizedBox(width: 8),
|
|
|
|
|
+ Icon(
|
|
|
|
|
+ Icons.chevron_right,
|
|
|
|
|
+ size: 18,
|
|
|
|
|
+ color: cs.onSurface.withAlpha(102),
|
|
|
),
|
|
),
|
|
|
- const SizedBox(width: 12),
|
|
|
|
|
],
|
|
],
|
|
|
- Column(
|
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
|
- children: [
|
|
|
|
|
- Text(amount, style: TextStyle(color: cs.onSurface, fontSize: 15, fontWeight: FontWeight.w600)),
|
|
|
|
|
- if (usdAmount.isNotEmpty)
|
|
|
|
|
- Text(usdAmount, style: TextStyle(color: cs.onSurface.withAlpha(120), fontSize: 12)),
|
|
|
|
|
- ],
|
|
|
|
|
- ),
|
|
|
|
|
- const SizedBox(width: 8),
|
|
|
|
|
- Icon(
|
|
|
|
|
- Icons.chevron_right,
|
|
|
|
|
- size: 18,
|
|
|
|
|
- color: cs.onSurface.withAlpha(102),
|
|
|
|
|
- ),
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ ),
|
|
|
),
|
|
),
|
|
|
- ),
|
|
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -566,7 +633,8 @@ class _Tag extends StatelessWidget {
|
|
|
border: Border.all(color: cs.onSurface.withAlpha(60)),
|
|
border: Border.all(color: cs.onSurface.withAlpha(60)),
|
|
|
borderRadius: BorderRadius.circular(4),
|
|
borderRadius: BorderRadius.circular(4),
|
|
|
),
|
|
),
|
|
|
- child: Text(label, style: TextStyle(color: cs.onSurface.withAlpha(153), fontSize: 10)),
|
|
|
|
|
|
|
+ child: Text(label,
|
|
|
|
|
+ style: TextStyle(color: cs.onSurface.withAlpha(153), fontSize: 10)),
|
|
|
);
|
|
);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -595,7 +663,8 @@ class _DataGrid extends StatelessWidget {
|
|
|
: CrossAxisAlignment.center,
|
|
: CrossAxisAlignment.center,
|
|
|
children: [
|
|
children: [
|
|
|
Text(row[i],
|
|
Text(row[i],
|
|
|
- style: TextStyle(color: cs.onSurface.withAlpha(120), fontSize: 11),
|
|
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface.withAlpha(120), fontSize: 11),
|
|
|
textAlign: i == 0
|
|
textAlign: i == 0
|
|
|
? TextAlign.left
|
|
? TextAlign.left
|
|
|
: i + 2 >= row.length
|
|
: i + 2 >= row.length
|
|
@@ -604,7 +673,10 @@ class _DataGrid extends StatelessWidget {
|
|
|
const SizedBox(height: 2),
|
|
const SizedBox(height: 2),
|
|
|
Text(
|
|
Text(
|
|
|
obscure ? '***' : row[i + 1],
|
|
obscure ? '***' : row[i + 1],
|
|
|
- style: TextStyle(color: cs.onSurface, fontSize: 13, fontWeight: FontWeight.w500),
|
|
|
|
|
|
|
+ style: TextStyle(
|
|
|
|
|
+ color: cs.onSurface,
|
|
|
|
|
+ fontSize: 13,
|
|
|
|
|
+ fontWeight: FontWeight.w500),
|
|
|
textAlign: i == 0
|
|
textAlign: i == 0
|
|
|
? TextAlign.left
|
|
? TextAlign.left
|
|
|
: i + 2 >= row.length
|
|
: i + 2 >= row.length
|