Skip to content

Instantly share code, notes, and snippets.

@Abolfazl-MI
Abolfazl-MI / database_adaptor.dart
Created February 25, 2023 13:00
sample for dependenci inversion
import 'package:taskino/core/data_response.dart';
import 'package:taskino/models/category_model.dart';
import 'package:taskino/models/project_model.dart';
import 'package:taskino/models/task_model.dart';
abstract class DataBaseAdaptor{
// Create opreations
Future<DataResponse> createProject(ProjectModel project);
Future<DataResponse>createTask(TaskModel task,);
Future<DataResponse>createCategory(CategoryModel category);
const List<Map<String,dynamic>>rawData=[
{
"cityId": "01",
"provinceName": "اردبيل",
"cityName": "اردبيل",
"provinceId": "24"
},
{
"cityId": "11",
"provinceName": "اردبيل",