getDateTime method

Future getDateTime()

Implementation

Future getDateTime() async {
  var decodedResponse;
  try {
    final response = await http.get(
      Uri.parse('${SDK_BASE_URL}diagnostics_api/time_slot'),
      headers: {'Authorization': SignUpController.currentUserToken},
    );
    decodedResponse = json.decode(response.body);
    GetDateTime = decodedResponse['data'];
  } catch (e) {
    errorListner(
        apiname: 'diagnostics_api/time_slot',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}