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 getQuestionnaire(int surveySubmissionId) async { reset(); loading = true; notifyListeners(); final response = await ApiManager.instance.get(URLs.getQuestionnaire + "?surveySubmissionId=$surveySubmissionId"); loading = false; notifyListeners(); } // Future loadChatHistory(int moduleId, int requestId) async { // // loadChatHistoryLoading = true; // // notifyListeners(); // chatLoginResponse = await ChatApiClient().loadChatHistory(moduleId, requestId); // loadChatHistoryLoading = false; // notifyListeners(); // } }