2020-05-06 17:40:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
2020-07-28 16:03:34 +00:00
|
|
|
import 'package:cake_wallet/palette.dart';
|
2020-05-06 17:40:36 +00:00
|
|
|
|
|
|
|
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) {
|
2020-07-28 16:03:34 +00:00
|
|
|
final color = isCurrent ? PaletteDark.lightOceanBlue : Colors.transparent;
|
|
|
|
final textColor = isCurrent ? Colors.blue : Colors.white;
|
2020-05-06 17:40:36 +00:00
|
|
|
|
|
|
|
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,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|