diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 46cfae5..d416984 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -57,7 +57,7 @@ class MessageLookup extends MessageLookupByLibrary { "male" : MessageLookupByLibrary.simpleMessage("Masculino"), "measuresHomepageButton" : MessageLookupByLibrary.simpleMessage("Medidas excecionais de resposta À COVID-19"), "measuresPageMeasures" : MessageLookupByLibrary.simpleMessage("Medidas Excecionais"), - "newPlural" : MessageLookupByLibrary.simpleMessage("Novos"), + "newPlural" : MessageLookupByLibrary.simpleMessage("Total"), "noConnection" : MessageLookupByLibrary.simpleMessage("Sem conexão"), "notificationsPageDescription" : MessageLookupByLibrary.simpleMessage("Que notificações vai receber?\nInformações importantes sobre atualização dos dados constantes nesta aplicação e avisos/alertas das entidades oficiais."), "notificationsPageOpenSettings" : MessageLookupByLibrary.simpleMessage("Abrir definições"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 6e3b970..3d50fe3 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -645,11 +645,11 @@ class S { ); } - /// `Novos` - String get newPlural { + /// `Total` + String get total { return Intl.message( - 'Novos', - name: 'newPlural', + 'Total', + name: 'total', desc: '', args: [], ); diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index bbc7714..2b2622a 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -60,7 +60,7 @@ "noConnection": "Sem conexão", "buttonTryAgain": "Tentar novamente", "cannotConnectInternetDescription": "Não conseguimos aceder à Internet para obter os dados mais recentes. Verifica a tua conexão.", - "newPlural": "Novos", + "newPlural": "Total", "seeDetails": "Ver Detalhes", "publishedAt": "Publicada às", "dateOf": "de", diff --git a/lib/ui/screens/statistics/components/statistics_horizontal.dart b/lib/ui/screens/statistics/components/statistics_horizontal.dart index 0dccc28..35fc356 100644 --- a/lib/ui/screens/statistics/components/statistics_horizontal.dart +++ b/lib/ui/screens/statistics/components/statistics_horizontal.dart @@ -25,16 +25,16 @@ class StatisticHorizontalWidget extends StatelessWidget { final String label; final int value; final double percentage; - final int absolute; - final String absoluteLabel; + final int secondaryValue; + final String secondaryValueLabel; final VoidCallback onTap; StatisticHorizontalWidget({ @required this.label, @required this.value, @required this.percentage, - @required this.absolute, - this.absoluteLabel, + @required this.secondaryValue, + this.secondaryValueLabel, @required this.onTap, }); @@ -68,8 +68,8 @@ class StatisticHorizontalWidget extends StatelessWidget { child: Container( padding: const EdgeInsets.only(left: 17.0), alignment: Alignment.centerLeft, - child: StatisticsNewAbsolute( - value: absolute, label: absoluteLabel), + child: StatisticsTotal( + value: secondaryValue, label: secondaryValueLabel), ), ), ], diff --git a/lib/ui/screens/statistics/components/statistics_new_absolute.dart b/lib/ui/screens/statistics/components/statistics_new_absolute.dart index 7391d31..eeb0d64 100644 --- a/lib/ui/screens/statistics/components/statistics_new_absolute.dart +++ b/lib/ui/screens/statistics/components/statistics_new_absolute.dart @@ -17,11 +17,11 @@ import 'package:covid19mobile/ui/screens/statistics/components/statistics_square import 'package:flutter/material.dart'; /// Statistics widget to show a squared new absolute values -class StatisticsNewAbsolute extends StatelessWidget { +class StatisticsTotal extends StatelessWidget { final int value; final String label; - StatisticsNewAbsolute({@required this.value, this.label}); + StatisticsTotal({@required this.value, this.label}); @override Widget build(BuildContext context) { @@ -36,7 +36,7 @@ class StatisticsNewAbsolute extends StatelessWidget { width: 3, ), Text( - (label == null) ? S.of(context).newPlural : label, + (label == null) ? S.of(context).total : label, style: TextStyles.h3Number(), ) ], diff --git a/lib/ui/screens/statistics/components/statistics_vertical.dart b/lib/ui/screens/statistics/components/statistics_vertical.dart index b756b3a..5fc4ba6 100644 --- a/lib/ui/screens/statistics/components/statistics_vertical.dart +++ b/lib/ui/screens/statistics/components/statistics_vertical.dart @@ -26,7 +26,7 @@ class StatisticVerticalWidget extends StatelessWidget { final String label; final double percentage; final int value; - final int valueDifference; + final int secondaryValue; final VoidCallback onTap; final bool shouldWrapContent; @@ -41,7 +41,7 @@ class StatisticVerticalWidget extends StatelessWidget { @required this.value, ///Absolute different of the value with the previous day - @required this.valueDifference, + @required this.secondaryValue, /// Adds a possible callback on tap this.onTap, @@ -71,7 +71,7 @@ class StatisticVerticalWidget extends StatelessWidget { ), Container( margin: const EdgeInsets.only(bottom: 8.0), - child: StatisticsNewAbsolute(value: valueDifference)), + child: StatisticsTotal(value: secondaryValue)), SeeDetailsWidget() ], ), diff --git a/lib/ui/screens/statistics/statistics_page.dart b/lib/ui/screens/statistics/statistics_page.dart index 2f9c336..6c23b23 100644 --- a/lib/ui/screens/statistics/statistics_page.dart +++ b/lib/ui/screens/statistics/statistics_page.dart @@ -65,9 +65,9 @@ class _StatisticsPageState extends BaseState { // Horizontal - Confirmed Cases StatisticHorizontalWidget( label: S.of(context).statisticsPageConfirmed, - value: currentStatistics.confirmed, + value: currentStatistics.confirmedAbsolut, percentage: currentStatistics.confirmedPercentage, - absolute: currentStatistics.confirmedAbsolut, + secondaryValue: currentStatistics.confirmed, onTap: () { Navigator.pushNamed(context, routeStatisticsConfirmed); }, @@ -80,9 +80,9 @@ class _StatisticsPageState extends BaseState { Expanded( child: StatisticVerticalWidget( label: S.of(context).statisticsPageDeaths, - value: currentStatistics.death, + value: currentStatistics.deathAbsolute, percentage: currentStatistics.deathPercentage, - valueDifference: currentStatistics.deathAbsolute, + secondaryValue: currentStatistics.death, shouldWrapContent: _shouldWrapContentBasedOnScreenWith(context), onTap: () { @@ -103,7 +103,7 @@ class _StatisticsPageState extends BaseState { label: S.of(context).statisticsPageRecovered, value: currentStatistics.recovered, percentage: currentStatistics.recoveredPercentage, - valueDifference: + secondaryValue: currentStatistics.recoveredAbsolute, shouldWrapContent: _shouldWrapContentBasedOnScreenWith(context), @@ -121,8 +121,8 @@ class _StatisticsPageState extends BaseState { label: S.of(context).statisticsPageHospitalized, value: currentStatistics.hospitalized, percentage: currentStatistics.hospitalizedPercentage, - absolute: currentStatistics.hospitalizedUCI, - absoluteLabel: + secondaryValue: currentStatistics.hospitalizedUCI, + secondaryValueLabel: S.of(context).statisticsPageHospitalizedUCI, onTap: () { Navigator.pushNamed(