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": "16",
      "store_id": "406",
      "is_paginate": "1",
      "per_page": "8",
      "v": "2",
    });

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

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