import 'dart:convert';

import 'package:cheminova/services/api_service.dart';
import 'package:cheminova/utils/api_urls.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http;

import '../models/InventoryManagementResponse.dart';

class InventoryManagementController extends GetxController {
  final apiService = ApiService();

  Future<InventoryManagementResponse> getProducts() async {
    final response =
        await apiService.get(ApiUrls.inventoryManangementOrdersStock);

    if (response.statusCode == 200) {
      return InventoryManagementResponse.fromJson(response.data);
    }else{
      return InventoryManagementResponse();
    }
  }
}
