diff --git a/lib/pages/analytics/services/device_location/device_location_service.dart b/lib/pages/analytics/services/device_location/device_location_service.dart new file mode 100644 index 00000000..d28b4a7b --- /dev/null +++ b/lib/pages/analytics/services/device_location/device_location_service.dart @@ -0,0 +1,6 @@ +import 'package:syncrow_web/pages/analytics/models/device_location_info.dart'; +import 'package:syncrow_web/pages/analytics/params/get_device_location_data_param.dart'; + +abstract interface class DeviceLocationService { + Future get(GetDeviceLocationDataParam param); +} diff --git a/lib/pages/analytics/services/device_location/fake_device_location_service.dart b/lib/pages/analytics/services/device_location/fake_device_location_service.dart new file mode 100644 index 00000000..c1a4e82f --- /dev/null +++ b/lib/pages/analytics/services/device_location/fake_device_location_service.dart @@ -0,0 +1,22 @@ +import 'package:syncrow_web/pages/analytics/models/device_location_info.dart'; +import 'package:syncrow_web/pages/analytics/params/get_device_location_data_param.dart'; +import 'package:syncrow_web/pages/analytics/services/device_location/device_location_service.dart'; + +class FakeDeviceLocationService implements DeviceLocationService { + const FakeDeviceLocationService(); + + @override + Future get(GetDeviceLocationDataParam param) async { + return await Future.delayed( + const Duration(milliseconds: 500), + () => const DeviceLocationInfo( + airQuality: 45.0, + humidity: 65.0, + city: 'Dubai', + country: 'UAE', + address: 'Business Bay', + temperature: 22.5, + ), + ); + } +}