Created
December 2, 2019 14:15
-
-
Save dllewellyn/5edf655014e1967e6a656a2d3ef69b0d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TransactionListItem extends StatefulWidget { | |
final Transaction transaction; | |
const TransactionListItem({Key key, @required this.transaction}) | |
: super(key: key); | |
@override | |
_TransactionListItemState createState() => _TransactionListItemState(); | |
} | |
class _TransactionListItemState extends State<TransactionListItem> { | |
@override | |
Widget build(BuildContext context) { | |
return Card( | |
child: Padding( | |
padding: const EdgeInsets.all(16.0), | |
child: Row( | |
children: <Widget>[ | |
Text( | |
widget.transaction.date, | |
style: Theme.of(context).textTheme.body1 | |
), | |
Spacer(), | |
Text( | |
widget.transaction.amount, | |
style: Theme.of(context).textTheme.caption, | |
), | |
], | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment