diff --git a/integration_test/app_test.dart b/integration_test/app_test.dart index c2b4bbb9..404fdbae 100644 --- a/integration_test/app_test.dart +++ b/integration_test/app_test.dart @@ -1,4 +1,5 @@ import 'dart:collection'; +import 'dart:developer'; import 'package:app_tracking_transparency/app_tracking_transparency.dart'; import 'package:firebase_core/firebase_core.dart'; diff --git a/lib/features/local/data/data_sources/locals_remote_data_source.dart b/lib/features/local/data/data_sources/locals_remote_data_source.dart index d105af49..39d4d166 100644 --- a/lib/features/local/data/data_sources/locals_remote_data_source.dart +++ b/lib/features/local/data/data_sources/locals_remote_data_source.dart @@ -70,7 +70,7 @@ class LocalsRemoteDataSourceImpl implements LocalsRemoteDataSource { @override Future processLocals(BuildContext context) async { - print('-> processLocals'); + log('-> processLocals'); try { final GetLocalsCall callback = FreAccessWSGlobal.getLocalsCall; final ApiCallResponse response = await callback.call(); diff --git a/lib/features/notification/deep_link_service.dart b/lib/features/notification/deep_link_service.dart index aac0351c..003f1903 100644 --- a/lib/features/notification/deep_link_service.dart +++ b/lib/features/notification/deep_link_service.dart @@ -1,4 +1,5 @@ import 'dart:async'; +import 'dart:developer'; import 'package:app_links/app_links.dart'; import 'package:flutter/material.dart'; import 'package:hub/features/storage/index.dart'; diff --git a/lib/flutter_flow/custom_functions.dart b/lib/flutter_flow/custom_functions.dart index c919577e..ed8fcd2d 100644 --- a/lib/flutter_flow/custom_functions.dart +++ b/lib/flutter_flow/custom_functions.dart @@ -1,5 +1,6 @@ import 'dart:convert'; import 'dart:math' as math; +import 'dart:developer' as dev; import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; @@ -50,7 +51,7 @@ Future> stringToMap(String v) async { }), )); } catch (e) { - log('Error parsing string to map: $e'); + dev.log('Error parsing string to map: $e'); return Future.value({}); } } diff --git a/lib/pages/pets_page/pets_page_model.dart b/lib/pages/pets_page/pets_page_model.dart index 753455fc..4d277121 100644 --- a/lib/pages/pets_page/pets_page_model.dart +++ b/lib/pages/pets_page/pets_page_model.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'dart:developer'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; @@ -165,7 +166,7 @@ class PetsPageModel extends FlutterFlowModel { (() async { final String url = 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId'; - print('img: $url'); + log('img: $url'); Response response = await get(Uri.parse(url)); String base64 = base64Encode(response.bodyBytes); uploadedTempFile = await ImageUtils.convertToUploadFile(base64); @@ -282,7 +283,7 @@ class PetsPageModel extends FlutterFlowModel { img = "base64;jpeg,$img"; final url = 'https://freaccess.com.br/freaccess/getImage.php?devUUID=$devUUID&userUUID=$userUUID&cliID=$cliUUID&atividade=consultaFotoPet&petId=$petId'; - print('img: $url'); + log('img: $url'); final response = await FreAccessWSGlobal.updatePet.call( petID: petId, image: img, diff --git a/lib/shared/widgets/read_view.dart b/lib/shared/widgets/read_view.dart index 0688906c..540431eb 100644 --- a/lib/shared/widgets/read_view.dart +++ b/lib/shared/widgets/read_view.dart @@ -87,7 +87,7 @@ class ReadViewState extends State { name: '${widget.title}.pdf', mimeType: 'application/pdf'); await Share.shareXFiles([xfile], text: 'Confira este PDF!'); } else { - print('Erro ao baixar o arquivo: ${response.statusCode}'); + log('Erro ao baixar o arquivo: ${response.statusCode}'); } } @@ -110,8 +110,20 @@ class ReadViewState extends State { future: _initializePdf(), builder: (context, snapshot) { if (!snapshot.hasData) return buildLoadingIndicator(context); + return PdfView( controller: snapshot.data!, + renderer: (PdfPage page) => page.render( + width: page.width * 2, + height: page.height * 2, + cropRect: Rect.fromLTWH( + 10.0, 10.0, page.width * 2, page.height * 2), + forPrint: false, + quality: 100, + removeTempFile: true, + format: PdfPageImageFormat.jpeg, + backgroundColor: '#ffffff', + ), scrollDirection: Axis.vertical, ); }),