import 'package:hmg_patient_app/config/config.dart';
import 'package:hmg_patient_app/core/model/qr/qr_parking_model.dart';
import 'package:hmg_patient_app/core/service/base_service.dart';

class QrService extends BaseService {
  List<QRParkingModel> qRParkingList =[];

  Future getQRParkingByID(int qRParkingID) async {
    Map<String, dynamic> body = Map();
    body['QRParkingID'] = qRParkingID;
    await baseAppClient.post(GET_QR_PARKING,
        onSuccess: (dynamic response, int statusCode) {
      response['List_SWP_QRParkingModel'].forEach((item) {
        qRParkingList.add(QRParkingModel.fromJson(item));
      });
    }, onFailure: (String error, int statusCode) {
      hasError = true;
      super.error = error;
    }, body: body);
  }
}
