Todo delete + Debug Logging to User

This commit is contained in:
Sewmina
2022-04-03 07:03:28 +05:30
parent 62ae8bad01
commit b7ce14a558
6 changed files with 559 additions and 377 deletions

23
lib/DebugHelper.dart Normal file
View File

@@ -0,0 +1,23 @@
class Debug{
static bool enableLogging = true;
static bool enableResponseLogging = true;
static bool enableErrorLoggin = true;
static void LogResponse(Object? response, {Object src= ''}){
if(!enableLogging){return;}
if(!enableResponseLogging) {return;}
print('\x1B[32m$src response\n$response\x1B[0m');
}
static void LogError(Object? msg){
if(!enableLogging){return;}
if(!enableErrorLoggin) {return;}
print('\x1B[31m$msg\x1B[0m');
}
static void Log(Object? msg){
if(!enableErrorLoggin) {return;}
print('\x1B[0m$msg');
}
}