Implement Webuntis HTTP Api and Display
This commit is contained in:
20
lib/dataOld/incommingPackets/authenticatePacket.dart
Normal file
20
lib/dataOld/incommingPackets/authenticatePacket.dart
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
import 'dart:developer';
|
||||
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import '../incomingPacket.dart';
|
||||
|
||||
class AuthenticatePacket extends IncomingPacket {
|
||||
AuthenticatePacket() : super("authenticate");
|
||||
|
||||
@override
|
||||
void handle(data) {
|
||||
SharedPreferences.getInstance().then((value) => {
|
||||
invoke(data: {
|
||||
'username': value.getString("username"),
|
||||
'password': value.getString("password")
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user