diff --git a/lib/pages/vehicles_on_the_property/vehicle_history_screen.dart b/lib/pages/vehicles_on_the_property/vehicle_history_screen.dart index 1e90cc84..ddbf6271 100644 --- a/lib/pages/vehicles_on_the_property/vehicle_history_screen.dart +++ b/lib/pages/vehicles_on_the_property/vehicle_history_screen.dart @@ -11,7 +11,7 @@ class VehicleHistoryScreen extends StatefulWidget { class _VehicleHistoryScreenState extends State with Pageable { final apiCall = PhpGroup.getVehiclesByProperty; - int count = 0; + int totalOwnerVehicles = 0; final PagingController _pagingController = PagingController(firstPageKey: 1); bool _isSnackble = true; @@ -28,7 +28,7 @@ class _VehicleHistoryScreenState extends State (newItems.jsonBody['vehicles'] as List?) ?? []; safeSetState(() { - count = newItems.jsonBody['total_rows'] ?? 0; + totalOwnerVehicles = newItems.jsonBody['total_owner_vehicles'] ?? 0; }); return (vehicles.isNotEmpty, vehicles); @@ -96,6 +96,12 @@ class _VehicleHistoryScreenState extends State Widget _buildHeader(BuildContext context) { final bodyFontSize = LimitedFontSizeUtil.getBodyFontSize(context); + final headerTitle = FFLocalizations.of(context).getVariableText( + ptText: "Meus Veículos: ", + enText: "My Vehicles: ", + ); + final totalRegisteredVehicles = widget.model.amountRegister; + return SizedBox( height: 30, child: Center( @@ -103,7 +109,7 @@ class _VehicleHistoryScreenState extends State (widget.model.amountRegister == '0' || widget.model.amountRegister == null) ? '' - : "${FFLocalizations.of(context).getVariableText(ptText: "Quantidade de Veículos: ", enText: "Amount of Vehicles: ")}${widget.model.amountRegister}/$count", + : "$headerTitle $totalOwnerVehicles/$totalRegisteredVehicles", textAlign: TextAlign.right, style: TextStyle( fontFamily: 'Nunito',