mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
Add MouseRegion to Expandable widget and clean up duplications
This commit is contained in:
parent
b4488fceed
commit
07cf1f3f92
4 changed files with 59 additions and 55 deletions
|
@ -53,10 +53,7 @@ class _MyWalletsState extends ConsumerState<MyWallets> {
|
|||
height: 20,
|
||||
),
|
||||
const Expanded(
|
||||
child: MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: WalletSummaryTable(),
|
||||
),
|
||||
child: WalletSummaryTable(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -89,11 +89,14 @@ class _ExpandableState extends State<Expandable> with TickerProviderStateMixin {
|
|||
return Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
GestureDetector(
|
||||
onTap: toggle,
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: widget.header,
|
||||
MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: toggle,
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: widget.header,
|
||||
),
|
||||
),
|
||||
),
|
||||
SizeTransition(
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:stackwallet/widgets/table_view/table_view_row.dart';
|
||||
|
||||
class TableView extends StatefulWidget {
|
||||
const TableView({
|
||||
|
@ -9,7 +8,7 @@ class TableView extends StatefulWidget {
|
|||
this.shrinkWrap = false,
|
||||
}) : super(key: key);
|
||||
|
||||
final List<TableViewRow> rows;
|
||||
final List<Widget> rows;
|
||||
final double rowSpacing;
|
||||
final bool shrinkWrap;
|
||||
|
||||
|
|
|
@ -26,53 +26,58 @@ class WalletInfoRow extends ConsumerWidget {
|
|||
.getManagerProvider(walletId));
|
||||
|
||||
if (Util.isDesktop) {
|
||||
return GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Row(
|
||||
children: [
|
||||
WalletInfoCoinIcon(coin: manager.coin),
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
),
|
||||
Text(
|
||||
manager.walletName,
|
||||
style: STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||
color:
|
||||
Theme.of(context).extension<StackColors>()!.textDark,
|
||||
return MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: onPressed,
|
||||
child: Container(
|
||||
color: Colors.transparent,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Row(
|
||||
children: [
|
||||
WalletInfoCoinIcon(coin: manager.coin),
|
||||
const SizedBox(
|
||||
width: 12,
|
||||
),
|
||||
),
|
||||
],
|
||||
Text(
|
||||
manager.walletName,
|
||||
style:
|
||||
STextStyles.desktopTextExtraSmall(context).copyWith(
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textDark,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: WalletInfoRowBalanceFuture(
|
||||
walletId: walletId,
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: WalletInfoRowBalanceFuture(
|
||||
walletId: walletId,
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.chevronRight,
|
||||
width: 20,
|
||||
height: 20,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textSubtitle1,
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
Expanded(
|
||||
flex: 6,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
Assets.svg.chevronRight,
|
||||
width: 20,
|
||||
height: 20,
|
||||
color: Theme.of(context)
|
||||
.extension<StackColors>()!
|
||||
.textSubtitle1,
|
||||
)
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue