add remember me

This commit is contained in:
2025-03-06 23:37:29 +01:00
parent daef20db66
commit 395d3390cf
2 changed files with 15 additions and 3 deletions

View File

@@ -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()
},
);