withAppEngineServices function Null safety

Future withAppEngineServices(
  1. Future callback(

    Runs callback inside a new service scope with appengine services added.

    The services available to callback are all non-request specific appengine services e.g. dbService.

    See package:gcloud/service_scope.dart for more information on service scopes.

    Here is an example on how this can be used:

    import 'dart:async';
    import 'dart:io';
    import 'package:appengine/appengine.dart';
    Future backgroundWork() {
      return dbService.query(Person).run().toList().then((persons) {
        // Do something with `persons`.
    void mainHandler(HttpRequest request) {
      dbService.query(Greeting).run().toList().then((greetings) {
            ..write('Number of greetings: ${greetings.length}')
    main() {
      withAppEngineServices(() {
        return Future.wait([


    Future withAppEngineServices(Future callback()) {
      return appengine_internal.withAppEngineServices(callback);