addLog function

Future<void> addLog(
  1. MethodChannel channel,
  2. String event
)

Implementation

@pragma('vm:entry-point')
Future<void> addLog(MethodChannel channel, String event) async {
  if (kReleaseMode) return;
  var fullEvent = "${DateTime.now()}: $event";
  print(fullEvent);
  await channel.invokeMethod<dynamic>("log", {"event": event});
}