
import 'package:hmg_patient_app/config/config.dart';
import 'package:hmg_patient_app/core/model/pharmacies/order_model.dart';
import 'package:hmg_patient_app/core/service/base_service.dart';
import 'package:hmg_patient_app/models/Authentication/authenticated_user.dart';
import 'package:hmg_patient_app/services/authentication/auth_provider.dart';
import 'package:hmg_patient_app/uitl/app_shared_preferences.dart';


class writeReviewService extends BaseService{



  AppSharedPreferences sharedPref = AppSharedPreferences();
  AppGlobal appGlobal = new AppGlobal();

  AuthenticatedUser authUser = new AuthenticatedUser();
  AuthProvider authProvider = new AuthProvider();

  List<OrderModel> get writeReview => writeReview;
  List<OrderModel> _writeReviewList =[];
  List<OrderModel> get orderList => _writeReviewList;


  Future getProductReview() async {
    hasError = false;
    await baseAppClient.getPharmacy(WRITE_REVIEW,
        onSuccess: (dynamic response, int statusCode) {
          _writeReviewList.clear();
          response[''].forEach((item) {
            _writeReviewList.add(OrderModel.fromJson(item));
          });
        }, onFailure: (String error, int statusCode) {
          hasError = true;
          super.error = error;
        });
  }
}