mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
CW-392 Allow Users to rename Monero and Haven accounts (#1008)
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
|
||||
class AccountTile extends StatelessWidget {
|
||||
AccountTile(
|
||||
@@ -19,16 +21,17 @@ class AccountTile extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final color = isCurrent
|
||||
? Theme.of(context).textTheme!.titleSmall!.decorationColor!
|
||||
: Theme.of(context).textTheme!.displayLarge!.decorationColor!;
|
||||
? Theme.of(context).textTheme.titleSmall!.decorationColor!
|
||||
: Theme.of(context).textTheme.displayLarge!.decorationColor!;
|
||||
final textColor = isCurrent
|
||||
? Theme.of(context).textTheme!.titleSmall!.color!
|
||||
: Theme.of(context).textTheme!.displayLarge!.color!;
|
||||
? Theme.of(context).textTheme.titleSmall!.color!
|
||||
: Theme.of(context).textTheme.displayLarge!.color!;
|
||||
|
||||
final Widget cell = GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Container(
|
||||
height: 77,
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(left: 24, right: 24),
|
||||
color: color,
|
||||
child: Wrap(
|
||||
@@ -58,7 +61,7 @@ class AccountTile extends StatelessWidget {
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontFamily: 'Lato',
|
||||
color: Theme.of(context).textTheme!.headlineMedium!.color!,
|
||||
color: Theme.of(context).textTheme.headlineMedium!.color!,
|
||||
decoration: TextDecoration.none,
|
||||
),
|
||||
),
|
||||
@@ -67,18 +70,26 @@ class AccountTile extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
);
|
||||
// FIX-ME: Splidable
|
||||
return cell;
|
||||
// return Slidable(
|
||||
// key: Key(accountName),
|
||||
// child: cell,
|
||||
// actionPane: SlidableDrawerActionPane(),
|
||||
// secondaryActions: <Widget>[
|
||||
// IconSlideAction(
|
||||
// caption: S.of(context).edit,
|
||||
// color: Colors.blue,
|
||||
// icon: Icons.edit,
|
||||
// onTap: () => onEdit?.call())
|
||||
// ]);
|
||||
|
||||
// return cell;
|
||||
return Slidable(
|
||||
key: Key(accountName),
|
||||
child: cell,
|
||||
endActionPane: _actionPane(context)
|
||||
);
|
||||
}
|
||||
|
||||
ActionPane _actionPane(BuildContext context) => ActionPane(
|
||||
motion: const ScrollMotion(),
|
||||
extentRatio: 0.3,
|
||||
children: [
|
||||
SlidableAction(
|
||||
onPressed: (_) => onEdit.call(),
|
||||
backgroundColor: Colors.blue,
|
||||
foregroundColor: Colors.white,
|
||||
icon: Icons.edit,
|
||||
label: S.of(context).edit,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user