title: I can't register the user
body: <p>the login method is working but the registration method does not work already I tried in many ways,</p>
  <p>please would like a little knowledge of your excellence, thank you very much</p>
  <p>repository to save to the database:</p>
  <pre><code>Future&lt;User&gt; register(User user) async {
    final String url = '${GlobalConfiguration().getString('api_base_url')}register';
    final client = new http.Client();
    final response = await client.post(
      url,
      headers: {HttpHeaders.contentTypeHeader: 'application/json'},
      body: json.encode(user.toMap()),
    );
    if (response.statusCode == 200) {
      setCurrentUser(response.body);
      currentUser.value = User.fromJSON(json.decode(response.body)['data']);
    } else {
      throw new Exception(response.body);
    }
    return currentUser.value;
  }
  </code></pre>
  <p>controller user:</p>
  <pre><code>void register() async {
      FocusScope.of(context).unfocus();
      if (loginFormKey.currentState.validate()) {
        loginFormKey.currentState.save();
        Overlay.of(context).insert(loader);
        repository.register(user).then((value) {
          if (value != null &amp;&amp; value.apiToken != null) {
            Navigator.of(scaffoldKey.currentContext).pushReplacementNamed('/Pages', arguments: 2);
          } else {
            scaffoldKey.currentState.showSnackBar(SnackBar(
              content: Text(S.current.wrong_email_or_password),
            ));
          }
        }).catchError((e) {
          loader.remove();
          scaffoldKey.currentState.showSnackBar(SnackBar(
            content: Text(S.current.this_email_account_exists),
          ));
        }).whenComplete(() {
          Helper.hideLoader(loader);
        });
      }
    }
  </code></pre>
  <p>erro:</p>
  <pre><code>E/flutter ( 7471): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: 'package:flutter/src/widgets/overlay.dart': Failed assertion: line 132 pos 12: '_overlay != null': is not true.
  E/flutter ( 7471): #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:42:39)
  E/flutter ( 7471): #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:38:5)
  E/flutter ( 7471): #2      OverlayEntry.remove (package:flutter/src/widgets/overlay.dart:132:12)
  E/flutter ( 7471): #3      Helper.hideLoader.&lt;anonymous closure&gt; (package:Imhungry/src/helpers/helper.dart:259:15)
  E/flutter ( 7471): #4      _rootRun (dart:async/zone.dart:1180:38)
  E/flutter ( 7471): #5      _CustomZone.run (dart:async/zone.dart:1077:19)
  E/flutter ( 7471): #6      _CustomZone.runGuarded (dart:async/zone.dart:979:7)
  E/flutter ( 7471): #7      _CustomZone.bindCallbackGuarded.&lt;anonymous closure&gt; (dart:async/zone.dart:1019:23)
  E/flutter ( 7471): #8      _rootRun (dart:async/zone.dart:1184:13)
  E/flutter ( 7471): #9      _CustomZone.run (dart:async/zone.dart:1077:19)
  E/flutter ( 7471): #10     _CustomZone.bindCallback.&lt;anonymous closure&gt; (dart:async/zone.dart:1003:23)
  E/flutter ( 7471): #11     Timer._createTimer.&lt;anonymous closure&gt; (dart:async-patch/timer_patch.dart:23:15)
  E/flutter ( 7471): #12     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:398:19)
  E/flutter ( 7471): #13     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
  E/flutter ( 7471): #14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
  </code></pre>