import 'package:flutter/material.dart'; class CakePayTile extends StatelessWidget { const CakePayTile({ Key? key, required this.title, required this.subTitle, this.onTap, }) : super(key: key); final VoidCallback? onTap; final String title; final String subTitle; @override Widget build(BuildContext context) { final colorScheme = Theme.of(context).colorScheme; return GestureDetector( onTap: onTap, child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( title, style: Theme.of(context).textTheme.bodySmall?.copyWith( color: colorScheme.onSurfaceVariant, ), ), SizedBox(height: 8), Text( subTitle, style: Theme.of(context).textTheme.titleMedium?.copyWith( color: colorScheme.onSurface, fontWeight: FontWeight.w600, ), ), ], ) ], ), ); } }