feat : new injection logic
test : some file :) chore : upgrade android gradle
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_livestock/data/model/response/address/address.dart';
|
||||
import 'package:rasadyar_livestock/data/model/response/auth/auth_response_model.dart';
|
||||
import 'package:rasadyar_livestock/data/model/response/captcha/captcha_response_model.dart';
|
||||
import 'package:rasadyar_livestock/data/model/response/live_tmp/livestock_model.dart';
|
||||
|
||||
abstract class LivestockRepository {
|
||||
@@ -11,4 +10,6 @@ abstract class LivestockRepository {
|
||||
|
||||
Future<bool> createTaggingLiveStock({required LivestockData data});
|
||||
|
||||
/* Future<List<LatLng>> getLocations();
|
||||
Future<void> addLocations(List<LatLng> latList);*/
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/data/services/network_status.dart';
|
||||
import 'package:rasadyar_livestock/data/data_source/local/tmp/tmp_local_data-source.dart';
|
||||
import 'package:rasadyar_livestock/data/data_source/remote/livestock/livestock_remote.dart';
|
||||
import 'package:rasadyar_livestock/data/model/local/location/tmp_locations.dart';
|
||||
import 'package:rasadyar_livestock/data/model/response/address/address.dart';
|
||||
import 'package:rasadyar_livestock/data/model/response/live_tmp/livestock_model.dart';
|
||||
|
||||
@@ -24,4 +29,35 @@ class LivestockRepositoryImp implements LivestockRepository {
|
||||
Future<bool> createTaggingLiveStock({required LivestockData data}) async {
|
||||
return await livestockRemote.createTaggingLiveStock(data: data);
|
||||
}
|
||||
/*
|
||||
@override
|
||||
Future<List<LatLng>> getLocations() async {
|
||||
if (NetworkStatus().isConnected.value) {
|
||||
return [
|
||||
LatLng(35.824891, 50.948025),
|
||||
LatLng(35.825000, 50.949000),
|
||||
LatLng(35.823000, 50.947000),
|
||||
LatLng(35.826000, 50.950000),
|
||||
LatLng(35.827000, 50.951000),
|
||||
LatLng(35.828000, 50.952000),
|
||||
LatLng(35.829000, 50.953000),
|
||||
LatLng(35.830000, 50.954000),
|
||||
LatLng(35.831000, 50.955000),
|
||||
LatLng(35.832000, 50.956000),
|
||||
LatLng(35.832000, 50.956055),
|
||||
];
|
||||
} else {
|
||||
*//*var res = await tmpLocalDataSource.getLocations();
|
||||
|
||||
return res.map((e) => LatLng(e.lat ?? 0.0, e.long ?? 0.0)).toList();*//*
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> addLocations(List<LatLng> latList) async {
|
||||
*//* await tmpLocalDataSource.addLocations(
|
||||
latList.map((e) => TmpLocations(lat: e.latitude, long: e.longitude)).toList(),
|
||||
);*//*
|
||||
iLog("it is done");
|
||||
}*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user