Skip to content

Commit

Permalink
Implement Category remote data source stracture
Browse files Browse the repository at this point in the history
  • Loading branch information
zaihcodes committed Dec 19, 2023
1 parent 469b9b0 commit 3c8bdcb
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions lib/src/category/data/data source/category_remote_date_source.dart
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();
}
}

0 comments on commit 3c8bdcb

Please sign in to comment.