mirror of
https://github.com/wger-project/flutter.git
synced 2026-12-02 10:09:11 +01:00
Suppress print warnings
This commit is contained in:
@@ -16,6 +16,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
@@ -405,6 +405,7 @@ String _formatHeader(String key) {
|
||||
|
||||
/// Processes the error messages from the server and returns a list of widgets
|
||||
List<Widget> formatApiErrors(List<ApiError> errors, {Color? color}) {
|
||||
final logger = Logger('formatApiErrors');
|
||||
final textColor = color ?? Colors.black;
|
||||
|
||||
final List<Widget> errorList = [];
|
||||
@@ -417,7 +418,7 @@ List<Widget> formatApiErrors(List<ApiError> errors, {Color? color}) {
|
||||
),
|
||||
);
|
||||
|
||||
print(error.errorMessages);
|
||||
logger.warning(error.errorMessages);
|
||||
for (final message in error.errorMessages) {
|
||||
errorList.add(Text(message, style: TextStyle(color: textColor)));
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:integration_test/integration_test_driver_extended.dart';
|
||||
|
||||
Reference in New Issue
Block a user