Add MouseRegion to Expandable widget and clean up duplications

This commit is contained in:
julian 2022-11-15 16:44:23 -06:00
parent b4488fceed
commit 07cf1f3f92
4 changed files with 59 additions and 55 deletions

View file

@ -53,11 +53,8 @@ class _MyWalletsState extends ConsumerState<MyWallets> {
height: 20,
),
const Expanded(
child: MouseRegion(
cursor: SystemMouseCursors.click,
child: WalletSummaryTable(),
),
),
],
),
);

View file

@ -89,13 +89,16 @@ class _ExpandableState extends State<Expandable> with TickerProviderStateMixin {
return Column(
mainAxisSize: MainAxisSize.min,
children: [
GestureDetector(
MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: toggle,
child: Container(
color: Colors.transparent,
child: widget.header,
),
),
),
SizeTransition(
sizeFactor: animation,
axisAlignment: 1.0,

View file

@ -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;

View file

@ -26,7 +26,9 @@ class WalletInfoRow extends ConsumerWidget {
.getManagerProvider(walletId));
if (Util.isDesktop) {
return GestureDetector(
return MouseRegion(
cursor: SystemMouseCursors.click,
child: GestureDetector(
onTap: onPressed,
child: Container(
color: Colors.transparent,
@ -42,9 +44,11 @@ class WalletInfoRow extends ConsumerWidget {
),
Text(
manager.walletName,
style: STextStyles.desktopTextExtraSmall(context).copyWith(
color:
Theme.of(context).extension<StackColors>()!.textDark,
style:
STextStyles.desktopTextExtraSmall(context).copyWith(
color: Theme.of(context)
.extension<StackColors>()!
.textDark,
),
),
],
@ -75,6 +79,7 @@ class WalletInfoRow extends ConsumerWidget {
],
),
),
),
);
} else {
return Row(