2020-05-06 17:40:36 +00:00
|
|
|
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) {
|
2020-08-19 17:57:06 +00:00
|
|
|
final color = isCurrent
|
|
|
|
? Theme.of(context).textTheme.subtitle.decorationColor
|
|
|
|
: Theme.of(context).textTheme.display4.decorationColor;
|
|
|
|
final textColor = isCurrent
|
|
|
|
? Theme.of(context).textTheme.subtitle.color
|
|
|
|
: Theme.of(context).textTheme.display4.color;
|
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,
|
2020-09-14 17:46:50 +00:00
|
|
|
fontFamily: 'Poppins',
|
2020-05-06 17:40:36 +00:00
|
|
|
color: textColor,
|
|
|
|
decoration: TextDecoration.none,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|