2020-05-08 16:22:56 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:cake_wallet/palette.dart';
|
|
|
|
|
|
|
|
class TemplateTile extends StatelessWidget {
|
|
|
|
TemplateTile({
|
2020-05-13 18:26:15 +00:00
|
|
|
@required this.to,
|
2020-05-08 16:22:56 +00:00
|
|
|
@required this.amount,
|
2020-05-13 18:26:15 +00:00
|
|
|
@required this.from,
|
2020-05-08 16:22:56 +00:00
|
|
|
@required this.onTap
|
|
|
|
});
|
|
|
|
|
2020-05-13 18:26:15 +00:00
|
|
|
final String to;
|
2020-05-08 16:22:56 +00:00
|
|
|
final String amount;
|
2020-05-13 18:26:15 +00:00
|
|
|
final String from;
|
2020-05-08 16:22:56 +00:00
|
|
|
final VoidCallback onTap;
|
|
|
|
|
|
|
|
final toIcon = Image.asset('assets/images/to_icon.png');
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
padding: EdgeInsets.only(right: 10),
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: onTap,
|
|
|
|
child: Container(
|
|
|
|
height: 40,
|
|
|
|
padding: EdgeInsets.only(left: 24, right: 24),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(20)),
|
|
|
|
color: PaletteDark.menuList
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: <Widget>[
|
|
|
|
Text(
|
|
|
|
amount,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
color: Colors.white
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: 5),
|
|
|
|
child: Text(
|
2020-05-13 18:26:15 +00:00
|
|
|
from,
|
2020-05-08 16:22:56 +00:00
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
color: Colors.white
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: 5),
|
|
|
|
child: toIcon,
|
|
|
|
),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.only(left: 5),
|
|
|
|
child: Text(
|
2020-05-13 18:26:15 +00:00
|
|
|
to,
|
2020-05-08 16:22:56 +00:00
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 16,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
color: Colors.white
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|