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.
cloudsolutions-atoms/lib/modules/cx_module/survey/survey_provider.dart

35 lines
969 B
Dart

import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:test_sa/controllers/api_routes/api_manager.dart';
import 'package:test_sa/controllers/api_routes/urls.dart';
class SurveyProvider with ChangeNotifier {
bool loading = false;
void reset() {
loading = false;
// ChatApiClient().chatLoginResponse = null;
}
Future<void> getQuestionnaire(int surveySubmissionId) async {
reset();
loading = true;
notifyListeners();
final response = await ApiManager.instance.get(URLs.getQuestionnaire + "?surveySubmissionId=$surveySubmissionId");
loading = false;
notifyListeners();
}
// Future<void> loadChatHistory(int moduleId, int requestId) async {
// // loadChatHistoryLoading = true;
// // notifyListeners();
// chatLoginResponse = await ChatApiClient().loadChatHistory(moduleId, requestId);
// loadChatHistoryLoading = false;
// notifyListeners();
// }
}