mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 18:07:44 +00:00
39 lines
977 B
Dart
39 lines
977 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
import 'package:cake_wallet/palette.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 ? PaletteDark.menuHeader : Colors.transparent;
|
||
|
final textColor = isCurrent ? Colors.blue : Colors.white;
|
||
|
|
||
|
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,
|
||
|
),
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|