-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Category remote data source stracture
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
lib/src/category/data/data source/category_remote_date_source.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import 'package:hadeeth/src/category/data/models/category_detail_model.dart'; | ||
import 'package:hadeeth/src/category/data/models/category_model.dart'; | ||
|
||
abstract class CategoryRemoteDataSource { | ||
Future<List<CategoryModel>> getAllCategories({required String lang}); | ||
Future<CategoryDetailModel> getCategoryDetail( | ||
{required String lang, | ||
required String categoryId, | ||
required String page, | ||
required String perPage}); | ||
} | ||
|
||
const BASE_URL = 'https://hadeethenc.com/api/v1/'; | ||
|
||
class CategoryRemoteDataSourceImpl implements CategoryRemoteDataSource { | ||
@override | ||
Future<List<CategoryModel>> getAllCategories({required String lang}) { | ||
// TODO: implement getAllCategories | ||
throw UnimplementedError(); | ||
} | ||
|
||
@override | ||
Future<CategoryDetailModel> getCategoryDetail( | ||
{required String lang, | ||
required String categoryId, | ||
required String page, | ||
required String perPage}) { | ||
// TODO: implement getCategoryDetail | ||
throw UnimplementedError(); | ||
} | ||
} |