Skip to content

Instantly share code, notes, and snippets.

@enzoftware
Created July 16, 2021 02:27
Show Gist options
  • Save enzoftware/f40a5c1bb55ce4f19ea8dcd742c7f291 to your computer and use it in GitHub Desktop.
Save enzoftware/f40a5c1bb55ce4f19ea8dcd742c7f291 to your computer and use it in GitHub Desktop.
Widget build(BuildContext context) {
// 1
final type = transaction.type.value();
final amount = transaction.amount;
final date = transaction.date;
// 2
return Semantics(
// 3
label: 'Transaction $type of $amount on $date',
child: ListTile(
leading: TransactionIndicator(transactionType: transaction.type),
title: Text(transaction.description),
subtitle: Text(transaction.date),
trailing: Text(transaction.amount.toString()),
),
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment