scope method

void scope(
  1. Function runApp
)

Implementation

void scope(Function runApp) async {
  assert(_telegramBotSender != null);
  runZonedGuarded(() {
    _initializeService();
    initializeDatabase();
    sync();
    FlutterError.onError = (FlutterErrorDetails errorDetails) {
      _sendReport(errorDetails.stack.toString());
    };
    runApp.call();
  }, (error, stackTrace) {
    _sendReport(
      error.toString(),
    );
  });
}