diff --git a/lib/modules/extract/extract_page.dart b/lib/modules/extract/extract_page.dart index 6c22aac..92219bc 100644 --- a/lib/modules/extract/extract_page.dart +++ b/lib/modules/extract/extract_page.dart @@ -19,12 +19,14 @@ class _ExtractPageState extends State { @override Widget build(BuildContext context) { - return Column( - children: [ - buildTitle(), - buildLine(), - buildListView(), - ], + return SingleChildScrollView( + child: Column( + children: [ + buildTitle(), + buildLine(), + buildListView(), + ], + ), ); } @@ -52,10 +54,19 @@ class _ExtractPageState extends State { counter++; } }); - - return Text( - "${boletos.length <= 1 ? "${boletos.length} pago" : "${boletos.length} pagos"}", - style: AppTextStyles.buttonGray, + final totalizer = boletos.fold( + 0, (sum, next) => sum + next.value!.toDouble()); + return Column( + children: [ + Text( + "${boletos.length <= 1 ? "${boletos.length} pago" : "${boletos.length} pagos"}", + style: AppTextStyles.buttonGray, + ), + Text( + 'R\$ ${totalizer.toStringAsFixed(2).replaceAll('.', ',')}', + style: AppTextStyles.buttonGray, + ), + ], ); }, ), diff --git a/lib/modules/my_boletos/my_boletos_page.dart b/lib/modules/my_boletos/my_boletos_page.dart index c5b1479..6479e46 100644 --- a/lib/modules/my_boletos/my_boletos_page.dart +++ b/lib/modules/my_boletos/my_boletos_page.dart @@ -23,18 +23,20 @@ class _MyBoletosPageState extends State { @override Widget build(BuildContext context) { - return Column( - children: [ - Visibility( - visible: widget.hasNotification, - child: buildBoletoInfoWidget(), - ), - buildTitle(), - buildLine(), - BoletoListWidget( - boletoListController: _boletoListController, - ), - ], + return SingleChildScrollView( + child: Column( + children: [ + Visibility( + visible: widget.hasNotification, + child: buildBoletoInfoWidget(), + ), + buildTitle(), + buildLine(), + BoletoListWidget( + boletoListController: _boletoListController, + ), + ], + ), ); } @@ -81,9 +83,19 @@ class _MyBoletosPageState extends State { ValueListenableBuilder>( valueListenable: _boletoListController.boletosNotifier, builder: (_, boletos, __) { - return Text( - "${boletos.length} ao total", - style: AppTextStyles.buttonGray, + final totalizer = boletos.fold( + 0, (sum, next) => sum + next.value!.toDouble()); + return Column( + children: [ + Text( + "${boletos.length} ao total", + style: AppTextStyles.buttonGray, + ), + Text( + 'R\$ ${totalizer.toStringAsFixed(2).replaceAll('.', ',')}', + style: AppTextStyles.buttonGray, + ), + ], ); }, ),