add remember me
This commit is contained in:
@@ -8,7 +8,8 @@ import '../pages/LoginDemo.dart';
|
||||
|
||||
class AuthService {
|
||||
// Login with username and password
|
||||
Future<bool> login(String username, String password) async {
|
||||
Future<bool> login(String username, String password,
|
||||
{bool rememberMe = false}) async {
|
||||
final url = Uri.parse("${globals.api}/token");
|
||||
|
||||
try {
|
||||
@@ -21,6 +22,7 @@ class AuthService {
|
||||
body: {
|
||||
"username": username,
|
||||
"password": password,
|
||||
"remember_me": rememberMe.toString()
|
||||
},
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user