File tree Expand file tree Collapse file tree 2 files changed +0
-348
lines changed
Expand file tree Collapse file tree 2 files changed +0
-348
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ import '/networking/api_provider.dart';
2020import '/models/response/product.dart' ;
2121import 'package:encrypt/encrypt.dart' as enc;
2222import 'package:encrypt/encrypt.dart' ;
23- import 'package:http/http.dart' as http;
24- import 'package:woosignal/models/response/ProductsListModel.dart' ;
2523import 'dart:convert' ;
2624
2725/// WooSignal Package version
@@ -244,21 +242,7 @@ class WooSignal {
244242 jsonResponse: (json) => Product .fromJson (json),
245243 );
246244 }
247- //fetch list of products by using url and then use ProductsListModel
248- Future <ProductsListModel > fetchProductsList () async {
249- final url = 'https://api.woosignal.com/shopify/v1/products' ;
250245
251- try {
252- final response = await http.get (Uri .parse (url));
253- if (response.statusCode == 200 ) {
254- return ProductsListModel .fromJson (json.decode (response.body));
255- } else {
256- throw Exception ('Failed to load data' );
257- }
258- } catch (e) {
259- throw Exception ('Error: $e ' );
260- }
261- }
262246
263247
264248}
You can’t perform that action at this time.
0 commit comments