json encoded http submissions, login now works?

This commit is contained in:
Finn 2019-05-09 12:52:25 +01:00
parent 5c718fc14b
commit 3af4997c01
No known key found for this signature in database
GPG key ID: 7455B4B17685B598
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ Future<LoginModel> requestLoginAPI(
final response = await http.post( final response = await http.post(
url, url,
body: body, body: json.encode(body),
); );
debugPrint(response.body); debugPrint(response.body);

View file

@ -15,7 +15,7 @@ class _SplashScreenState extends State<SplashScreen> {
startTime() async { startTime() async {
return Timer(Duration(seconds: splashDuration), () { return Timer(Duration(seconds: splashDuration), () {
SystemChannels.textInput.invokeMethod('TextInput.hide'); SystemChannels.textInput.invokeMethod('TextInput.hide');
Navigator.of(context).pushReplacementNamed('/HomePage'); Navigator.of(context).pushReplacementNamed('/LoginPage');
}); });
} }