location has been enabled in addition to sending the domain
This commit is contained in:
@@ -855,6 +855,7 @@ import 'package:flutter_svg/flutter_svg.dart';
|
||||
import '../widgets/settings_bar.dart';
|
||||
|
||||
import '../../core/di/injection_container.dart';
|
||||
import '../../core/location/location_service.dart';
|
||||
import '../../domain/models/attendance_login_request.dart';
|
||||
import '../../domain/models/attendance_logout_request.dart';
|
||||
import '../../domain/usecases/attendance_login_usecase.dart';
|
||||
@@ -1061,6 +1062,12 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
// Fetch device location
|
||||
final position =
|
||||
await sl<LocationService>().getCurrentPosition();
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
final result = await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
@@ -1077,6 +1084,8 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
|
||||
employeeId: employeeId,
|
||||
faceImage: imageFile,
|
||||
localAuth: localAuth, // ✅
|
||||
latitude: position?.latitude,
|
||||
longitude: position?.longitude,
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -1170,6 +1179,12 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
// Fetch device location
|
||||
final position =
|
||||
await sl<LocationService>().getCurrentPosition();
|
||||
|
||||
if (!mounted) return;
|
||||
|
||||
final result = await Navigator.of(context).push(
|
||||
MaterialPageRoute(
|
||||
builder:
|
||||
@@ -1187,6 +1202,8 @@ class _AttendanceScreenState extends State<AttendanceScreen> {
|
||||
employeeId: employeeId,
|
||||
faceImage: imageFile,
|
||||
localAuth: localAuth, // ✅
|
||||
latitude: position?.latitude,
|
||||
longitude: position?.longitude,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user