Skip to content

Commit 9d2aa08

Browse files
committed
chore(dart): use log over print
1 parent 8f14e22 commit 9d2aa08

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

templates/dart/lib/src/client_mixin.dart.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:http/http.dart' as http;
22
import 'exception.dart';
33
import 'response.dart';
44
import 'dart:convert';
5+
import 'dart:developer';
56
import 'enums.dart';
67

78
class ClientMixin {
@@ -70,7 +71,7 @@ class ClientMixin {
7071

7172
String? warnings = res.headers['x-{{ spec.title | lower }}-warning'];
7273
if (warnings != null) {
73-
warnings.split(';').forEach((warning) => print(warning));
74+
warnings.split(';').forEach((warning) => log('Warning: $warning'));
7475
}
7576

7677
if (res.statusCode >= 400) {

templates/flutter/lib/src/client_mixin.dart.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:http/http.dart' as http;
22
import 'exception.dart';
33
import 'response.dart';
44
import 'dart:convert';
5+
import 'dart:developer';
56
import 'enums.dart';
67

78
class ClientMixin {
@@ -70,7 +71,7 @@ class ClientMixin {
7071

7172
String? warnings = res.headers['x-{{ spec.title | lower }}-warning'];
7273
if (warnings != null) {
73-
warnings.split(';').forEach((warning) => print(warning));
74+
warnings.split(';').forEach((warning) => log('Warning: $warning'));
7475
}
7576

7677
if (res.statusCode >= 400) {

0 commit comments

Comments
 (0)