From acc5d5e9e960db9525a4368b393cb97fab8658e7 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 21 Jul 2018 16:15:36 +0200 Subject: Better coding style --- lib/data/rest_ds.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/data/rest_ds.dart') diff --git a/lib/data/rest_ds.dart b/lib/data/rest_ds.dart index 7d66d4a..36a82c7 100644 --- a/lib/data/rest_ds.dart +++ b/lib/data/rest_ds.dart @@ -6,11 +6,11 @@ import 'package:beam_messenger/models/user.dart'; class RestDatasource { NetworkUtil _netUtil = new NetworkUtil(); - static final BASE_URL = "http://192.168.0.74:8000"; - static final LOGIN_URL = BASE_URL + "/login"; + static final baseUrl = "http://192.168.0.74:8000"; + static final loginUrl = baseUrl + "/login"; Future login(String email, String password) { - return _netUtil.post(LOGIN_URL, + return _netUtil.post(loginUrl, body: {"email": email, "password": password}).then((dynamic res) { print(res.toString()); if (res["status"]) throw new Exception(res["message"]); -- cgit v1.2.3