You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.1 KiB
Dart
31 lines
1.1 KiB
Dart
|
2 months ago
|
import 'dart:convert';
|
||
|
|
|
||
|
|
import 'package:hmg_patient_app_new/core/app_state.dart';
|
||
|
|
import 'package:http/http.dart';
|
||
|
|
|
||
|
|
import '../../core/consts.dart';
|
||
|
|
import '../api_client.dart';
|
||
|
|
import 'models/response_models/get_patient_last_login_details_response_model.dart';
|
||
|
|
|
||
|
|
class AuthenticationApiClient {
|
||
|
|
static final AuthenticationApiClient _instance = AuthenticationApiClient._internal();
|
||
|
|
|
||
|
|
AuthenticationApiClient._internal();
|
||
|
|
|
||
|
|
factory AuthenticationApiClient() => _instance;
|
||
|
|
|
||
|
|
Future<GetPatientLastLoginDetailsResponseModel> getMultipleLoginUserData(String deviceIMEI) async {
|
||
|
|
GetPatientLastLoginDetailsResponseModel getPatientLastLoginDetailsResponseModel;
|
||
|
|
|
||
|
|
Map<String, dynamic> request = {"IMEI": deviceIMEI};
|
||
|
|
request.addAll(AppState().postParamsJson);
|
||
|
|
String url = ApiConsts.baseUrl + ApiConsts.SELECT_DEVICE_IMEI;
|
||
|
|
Response response = await ApiClient().postJsonForResponse(url, request);
|
||
|
|
|
||
|
|
var json = jsonDecode(response.body);
|
||
|
|
getPatientLastLoginDetailsResponseModel = GetPatientLastLoginDetailsResponseModel.fromJson(json);
|
||
|
|
|
||
|
|
return getPatientLastLoginDetailsResponseModel;
|
||
|
|
}
|
||
|
|
}
|