Browse Source

Block on writing logline to file

Vishnu Mohandas 4 years ago
parent
commit
50b12aefbd
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/core/network.dart

+ 2 - 2
lib/core/network.dart

@@ -15,10 +15,10 @@ class Network {
         responseHeader: false,
         requestBody: true,
         responseBody: true,
-        logPrint: (object) {
+        logPrint: (object) async {
           log(object);
           if (Platform.isAndroid) {
-            SuperLogging.logFile.writeAsString(
+            await SuperLogging.logFile.writeAsString(
               object.toString() + "\n",
               encoding: Utf8Codec(allowMalformed: true),
               mode: FileMode.append,