cake_wallet/lib/src/screens/monero_accounts/widgets/account_tile.dart
2020-07-06 23:09:03 +03:00

38 lines
No EOL
1,004 B
Dart

import 'package:flutter/material.dart';
class AccountTile extends StatelessWidget {
AccountTile({
@required this.isCurrent,
@required this.accountName,
@required this.onTap
});
final bool isCurrent;
final String accountName;
final VoidCallback onTap;
@override
Widget build(BuildContext context) {
final color = isCurrent ? Theme.of(context).accentTextTheme.subtitle.decorationColor : Colors.transparent;
final textColor = isCurrent ? Colors.blue : Theme.of(context).primaryTextTheme.title.color;
return GestureDetector(
onTap: onTap,
child: Container(
height: 77,
padding: EdgeInsets.only(left: 24, right: 24),
alignment: Alignment.centerLeft,
color: color,
child: Text(
accountName,
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: textColor,
decoration: TextDecoration.none,
),
),
),
);
}
}