Files
hash-wallet/lib/new-ui/widgets/bridge/expandable_details_card.dart
586a040e4a CW-1273: Implement USDT0 Bridge (#2855)
* feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu.

* feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu.

* feat: Implement USDT0 Bridging using OFT Standard by Layer Zero. POC available in apps menu.

* Add transaction history and status polling for USDT0 bridging

* Add  Transaction history and status polling for USDT0 Bridging

* USDT0 Bridging Implementation

* Update Arbitrum USDT token symbol

* fix: Merge conflicts

* fix: Merge conflicts

* chore: Rever formatting

* feat: Implement new flow

* feat: Implement new ui flow

* Add currency to configure

* feat: new ui flow

* Update USDT0 implementation
- Switch to sqlite for storage instead of hive
- Switch bridge history and details to modals
- Switch bridge transfer details page to new tx details ui

* refactor: rearrange modal action buttons

* enhance usdt0 bridge flows

* Update lib/entities/wallet_manager.dart [skip ci]

---------

Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
2026-04-15 05:06:05 +02:00

114 lines
3.9 KiB
Dart

import 'package:flutter/material.dart';
class ExpandableBridgeDetailRow extends StatefulWidget {
const ExpandableBridgeDetailRow({
required this.label,
required this.title,
this.address,
this.showChevron = false,
});
final String label;
final String title;
final String? address;
final bool showChevron;
@override
State<ExpandableBridgeDetailRow> createState() => ExpandableBridgeDetailRowState();
}
class ExpandableBridgeDetailRowState extends State<ExpandableBridgeDetailRow> {
bool _expanded = false;
@override
Widget build(BuildContext context) {
final scheme = Theme.of(context).colorScheme;
final showChevron = widget.showChevron;
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
InkWell(
onTap: showChevron ? () => setState(() => _expanded = !_expanded) : null,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.label,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: scheme.onSurface,
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: -0.07,
),
),
const SizedBox(width: 12),
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: Text(
widget.title,
textAlign: TextAlign.end,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
fontWeight: FontWeight.w400,
fontSize: 14,
letterSpacing: -0.07,
color: scheme.onSurfaceVariant,
),
),
),
if (showChevron) ...[
const SizedBox(width: 2),
AnimatedRotation(
turns: _expanded ? 0.5 : 0,
duration: const Duration(milliseconds: 200),
curve: Curves.easeOutCubic,
child: Icon(
Icons.keyboard_arrow_down,
size: 22,
color: scheme.onSurfaceVariant,
),
),
],
],
),
),
],
),
),
),
AnimatedSize(
duration: const Duration(milliseconds: 200),
curve: Curves.easeOutCubic,
alignment: Alignment.topCenter,
child: showChevron && _expanded
? Padding(
padding: const EdgeInsets.fromLTRB(16, 0, 16, 14),
child: Align(
alignment: Alignment.centerRight,
child: SelectableText(
widget.address ?? '',
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 13,
height: 1.35,
color: scheme.onSurfaceVariant,
fontWeight: FontWeight.w400,
),
),
),
)
: const SizedBox.shrink(),
),
],
);
}
}