import 'package:feelverapp/model/shopservice/shop_service_Model.dart';
import 'package:feelverapp/service/api.dart';
import 'package:feelverapp/service/base_presenter.dart';
import 'package:feelverapp/ui/shop/shop_service.dart';
import 'package:flutter/material.dart';

class ShopServicePresenter extends BasePresenter<ShopServicePage> {
  Api _api;
  final formkey = GlobalKey<FormState>();
  shopserviceModel serviceModel;

  ShopServicePresenter(State<ShopServicePage> state) : super(state);

  Servicelistitem() async {
    _api = Api<shopserviceModel>();
    var res = await _api.shopservice({
      "vendor_id": "9",
      "store_id": "284",
      "is_paginate": "1",
      "per_page": "1",
      "v": "1",
    });

    if (res.fail == null) {
      setState(() {
        serviceModel = res.success;
        print("sssssssssssss");

        print('${serviceModel.data[0].name}');
      });
    } else {
      print('res Fail');
    }
  }
}
