From 8f41f691fc23159943008f93e5088b8ae4348011 Mon Sep 17 00:00:00 2001 From: jhonathanqz029 <74057391+jhonathanqz029@users.noreply.github.com> Date: Sat, 10 Jul 2021 10:57:28 -0300 Subject: [PATCH 1/2] =?UTF-8?q?Corre=C3=A7=C3=A3o=20da=20pagina=20MeusBole?= =?UTF-8?q?tos=20e=20MeusExtratos,=20onde=20n=C3=A3o=20estava=20tendo=20sc?= =?UTF-8?q?rool=20da=20p=C3=A1gina?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/modules/extract/extract_page.dart | 14 ++++++----- lib/modules/my_boletos/my_boletos_page.dart | 26 +++++++++++---------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/lib/modules/extract/extract_page.dart b/lib/modules/extract/extract_page.dart index 6c22aac..237ceb3 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(), + ], + ), ); } diff --git a/lib/modules/my_boletos/my_boletos_page.dart b/lib/modules/my_boletos/my_boletos_page.dart index c5b1479..8be428c 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, + ), + ], + ), ); } From 737a948f60db2e15da4bab6bae549ebe1e4d39c4 Mon Sep 17 00:00:00 2001 From: jhonathanqz029 <74057391+jhonathanqz029@users.noreply.github.com> Date: Sat, 7 Aug 2021 14:43:11 -0300 Subject: [PATCH 2/2] Configure totalizer from boletos --- lib/modules/extract/extract_page.dart | 17 +++++++++++++---- lib/modules/my_boletos/my_boletos_page.dart | 16 +++++++++++++--- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/modules/extract/extract_page.dart b/lib/modules/extract/extract_page.dart index 237ceb3..92219bc 100644 --- a/lib/modules/extract/extract_page.dart +++ b/lib/modules/extract/extract_page.dart @@ -54,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 8be428c..6479e46 100644 --- a/lib/modules/my_boletos/my_boletos_page.dart +++ b/lib/modules/my_boletos/my_boletos_page.dart @@ -83,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, + ), + ], ); }, ),