| 1 | import 'package:flutter/material.dart'; |
| 2 | |
| 3 | class CakePayTile extends StatelessWidget { |
| 4 | const CakePayTile({ |
| 5 | Key? key, |
| 6 | required this.title, |
| 7 | required this.subTitle, |
| 8 | this.onTap, |
| 9 | }) : super(key: key); |
| 10 | |
| 11 | final VoidCallback? onTap; |
| 12 | final String title; |
| 13 | final String subTitle; |
| 14 | |
| 15 | @override |
| 16 | Widget build(BuildContext context) { |
| 17 | final colorScheme = Theme.of(context).colorScheme; |
| 18 | |
| 19 | return GestureDetector( |
| 20 | onTap: onTap, |
| 21 | child: Row( |
| 22 | mainAxisAlignment: MainAxisAlignment.spaceBetween, |
| 23 | children: [ |
| 24 | Column( |
| 25 | crossAxisAlignment: CrossAxisAlignment.start, |
| 26 | children: [ |
| 27 | Text( |
| 28 | title, |
| 29 | style: Theme.of(context).textTheme.bodySmall?.copyWith( |
| 30 | color: colorScheme.onSurfaceVariant, |
| 31 | ), |
| 32 | ), |
| 33 | SizedBox(height: 8), |
| 34 | Text( |
| 35 | subTitle, |
| 36 | style: Theme.of(context).textTheme.titleMedium?.copyWith( |
| 37 | color: colorScheme.onSurface, |
| 38 | fontWeight: FontWeight.w600, |
| 39 | ), |
| 40 | ), |
| 41 | ], |
| 42 | ) |
| 43 | ], |
| 44 | ), |
| 45 | ); |
| 46 | } |
| 47 | } |