Added api for sending feedback
This commit is contained in:
@ -1,5 +1,8 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:crypto/crypto.dart';
|
||||
import 'package:firebase_messaging/firebase_messaging.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
@ -35,6 +38,14 @@ class AccountData {
|
||||
return _password!;
|
||||
}
|
||||
|
||||
String getUserId() {
|
||||
return sha512.convert(utf8.encode("${AccountData().getUsername()}:${AccountData().getPassword()}")).toString();
|
||||
}
|
||||
|
||||
Future<String> getDeviceId() async {
|
||||
return sha512.convert(utf8.encode("${getUserId()}@${await FirebaseMessaging.instance.getToken()}")).toString();
|
||||
}
|
||||
|
||||
Future<void> setData(String username, String password) async {
|
||||
SharedPreferences storage = await _storage;
|
||||
|
||||
|
Reference in New Issue
Block a user