Skip to content
Snippets Groups Projects
Commit 25666819 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Avoid print calls in production code

parent 65cd824e
No related branches found
No related tags found
No related merge requests found
Pipeline #5233 passed
This commit is part of merge request !73. Comments created here will be created in the context of that merge request.
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.1.36
app.versionCode=60
app.versionName=0.1.37
app.versionCode=61
Avoid print calls in production code.
Supprime les appels à print dans le code de production.
......@@ -6,6 +6,7 @@ import 'package:wordguessing/provider/data.dart';
import 'package:wordguessing/screens/game_pick_image.dart';
import 'package:wordguessing/screens/game_pick_word.dart';
import 'package:wordguessing/screens/home.dart';
import 'package:wordguessing/utils/tools.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
......@@ -38,7 +39,7 @@ class MyApp extends StatelessWidget {
);
default:
print("Unknown menu entry");
printlog("Unknown menu entry");
}
return null;
......
......@@ -4,6 +4,7 @@ import 'dart:convert';
import 'package:flutter/services.dart';
import 'package:wordguessing/models/word.dart';
import 'package:wordguessing/utils/tools.dart';
class RandomPickWords {
RandomPickWords();
......@@ -39,12 +40,12 @@ class RandomPickWords {
}
});
} catch (e) {
print("$e");
printlog("$e");
}
// Check we have enough words
if (wordList.length < count) {
print('Not enough words in list.');
printlog('Not enough words in list.');
}
// Remove empty words
......
import 'package:flutter/foundation.dart';
void printlog(String message) {
if (!kReleaseMode) {
debugPrint(message);
}
}
name: wordguessing
description: A wordguessing game application.
publish_to: 'none'
version: 0.1.36+60
version: 0.1.37+61
environment:
sdk: '^3.0.0'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment