prepare method Null safety

  1. @override
Future prepare()
override

Initialize services in this method.

Implement this method to initialize services, read values from options and any other initialization required before constructing entryPoint.

This method is invoked prior to entryPoint being accessed.

Implementation

@override
Future prepare() async {
  logger.onRecord.listen(
      (rec) => print("$rec ${rec.error ?? ""} ${rec.stackTrace ?? ""}"));
}