feat: refactor code

This commit is contained in:
2026-06-17 12:57:28 +03:30
parent e9f294fa19
commit 519752b478
106 changed files with 3459 additions and 2309 deletions
@@ -0,0 +1,32 @@
import 'package:dio/dio.dart';
import '../../../../../core/locator/locator.dart';
import '../../../../../core/network/api_provider_imp.dart';
class ShopApiProvider {
ApiProviderImp get _api => locator<ApiProviderImp>();
Future<Response> getShop() => _api.get('/shop');
Future<Response> buyCard(String cardId) =>
_api.post('/shop/buy-card', body: {'card_id': cardId});
Future<Response> selectCard(String cardId) =>
_api.post('/shop/select-card', body: {'card_id': cardId});
Future<Response> purchase({
required String store,
required String kind,
required String productId,
required String token,
}) =>
_api.post('/shop/purchase', body: {
'store': store,
'kind': kind,
'product_id': productId,
'token': token,
});
Future<Response> adReward(String token) =>
_api.post('/rewards/ad', body: {'token': token});
}