Attendance validation involving Location Detection + Facial Recoginition with Liveness Detection
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
/// Debug-only settings for development and testing.
|
||||
/// Only functional in debug builds (kDebugMode).
|
||||
class DebugSettings {
|
||||
final bool bypassGeofence;
|
||||
|
||||
const DebugSettings({this.bypassGeofence = false});
|
||||
|
||||
DebugSettings copyWith({bool? bypassGeofence}) {
|
||||
return DebugSettings(bypassGeofence: bypassGeofence ?? this.bypassGeofence);
|
||||
}
|
||||
}
|
||||
|
||||
class DebugSettingsNotifier extends StateNotifier<DebugSettings> {
|
||||
DebugSettingsNotifier() : super(const DebugSettings());
|
||||
|
||||
void toggleGeofenceBypass() {
|
||||
if (kDebugMode) {
|
||||
state = state.copyWith(bypassGeofence: !state.bypassGeofence);
|
||||
}
|
||||
}
|
||||
|
||||
void setGeofenceBypass(bool value) {
|
||||
if (kDebugMode) {
|
||||
state = state.copyWith(bypassGeofence: value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final debugSettingsProvider =
|
||||
StateNotifierProvider<DebugSettingsNotifier, DebugSettings>(
|
||||
(ref) => DebugSettingsNotifier(),
|
||||
);
|
||||
Reference in New Issue
Block a user